码迷,mamicode.com
首页 > 编程语言 > 详细

Unity获取系统详细信息

时间:2014-12-15 13:34:34      阅读:793      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   ar   color   os   sp   for   on   

为了方便以后直接拿来用,所以这次总结一下,有些还没有了解其意。

 1 using UnityEngine;
 2 using System.Collections;
 3 /// <summary>
 4 /// 获取当前设备信息
 5 /// </summary>
 6 public class GetSystemInfo : MonoBehaviour {
 7 
 8     string systemInfo;
 9     // Use this for initialization
10     void Start () 
11     {
12         systemInfo = "\tTitle:当前系统基础信息:\n设备模型:" + SystemInfo.deviceModel + "\n设备名称:" + SystemInfo.deviceName + "\n设备类型:" + SystemInfo.deviceType +
13             "\n设备唯一标识符:" + SystemInfo.deviceUniqueIdentifier + "\n显卡标识符:"+SystemInfo.graphicsDeviceID +
14             "\n显卡设备名称:"+SystemInfo.graphicsDeviceName + "\n显卡厂商:"+SystemInfo.graphicsDeviceVendor +
15             "\n显卡厂商ID:"+SystemInfo.graphicsDeviceVendorID + "\n显卡支持版本:"+SystemInfo.graphicsDeviceVersion +
16             "\n显存(M):"+SystemInfo.graphicsMemorySize + "\n显卡像素填充率(百万像素/秒),-1未知填充率:"+SystemInfo.graphicsPixelFillrate +
17             "\n显卡支持Shader层级:"+SystemInfo.graphicsShaderLevel + "\n支持最大图片尺寸:"+SystemInfo.maxTextureSize +
18             "\nnpotSupport:" + SystemInfo.npotSupport + "\n操作系统:"+SystemInfo.operatingSystem +
19             "\nCPU处理核数:"+SystemInfo.processorCount + "\nCPU类型:"+SystemInfo.processorType +
20             "\nsupportedRenderTargetCount:" + SystemInfo.supportedRenderTargetCount + "\nsupports3DTextures:" + SystemInfo.supports3DTextures +
21             "\nsupportsAccelerometer:" + SystemInfo.supportsAccelerometer + "\nsupportsComputeShaders:" + SystemInfo.supportsComputeShaders +
22             "\nsupportsGyroscope:" + SystemInfo.supportsGyroscope + "\nsupportsImageEffects:" + SystemInfo.supportsImageEffects +
23             "\nsupportsInstancing:" + SystemInfo.supportsInstancing + "\nsupportsLocationService:" + SystemInfo.supportsLocationService +
24             "\nsupportsRenderTextures:" + SystemInfo.supportsRenderTextures + "\nsupportsRenderToCubemap:" + SystemInfo.supportsRenderToCubemap +
25             "\nsupportsShadows:" + SystemInfo.supportsShadows + "\nsupportsSparseTextures:" + SystemInfo.supportsSparseTextures +
26             "\nsupportsStencil:" + SystemInfo.supportsStencil + "\nsupportsVertexPrograms:" + SystemInfo.supportsVertexPrograms +
27             "\nsupportsVibration:" + SystemInfo.supportsVibration + "\n内存大小:" + SystemInfo.systemMemorySize;
28     
29     }
30     
31     // Update is called once per frame
32     void OnGUI () {
33         GUILayout.Label(systemInfo);
34     }
35 }

 

Unity获取系统详细信息

标签:style   blog   io   ar   color   os   sp   for   on   

原文地址:http://www.cnblogs.com/Vincentblogs/p/4164565.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!