Unity获取系统信息SystemInfo(CPU、显卡、操作系统等信息)

一、设备

1 设备模型 SystemInfo.deviceModel

设备的模型(只读)。例:iPhone6,2Xiaomi MI 5

2 设备名称 SystemInfo.deviceName

用户定义的设备名称(只读),这通常是设备在网络上出现时的名称,比如连wifi的时候出现在连接列表中的那个名称。

3 设备类型 SystemInfo.deviceType

它是一个枚举(只读)。

public enum DeviceType
{
    
    
    Unknown = 0,
    Handheld = 1, //手持设备,如手机,平板
    Console = 2, //游戏机
    Desktop = 3 //台式电脑,笔记本电脑
}

4 设备标识符 SystemInfo.deviceUniqueIdentifier

设备唯一标识符(只读)。
iOS
iOS7之前的设备上,它将返回MAC地址的哈希值。在iOS7设备上,它将是UIDevice identifierForVendor,或者,如果由于某种原因失败,则为ASIdentifierManager advertisingIdentifier

Android
始终返回ANDROID_IDmd5。请注意,自Android 8.0API级别26)起,ANDROID_ID取决于应用程序的签名密钥。这意味着“未签名”构建(默认情况下使用调试密钥库进行签名)的值将不同于“已签名”构建的值。

Windows Standalone
从计算机系统硬件类中提取的字符串串联返回哈希值:

Win32_BaseBoard :: SerialNumber
Win32_BIOS :: SerialNumber
Win32_Processor :: UniqueId
Win32_DiskDrive :: SerialNumber
Win32_OperatingSystem :: SerialNumber

二、显卡

1 显卡名称 SystemInfo.graphicsDeviceName

显卡名称,例:Adreno(TM)530

2 显卡标识符 SystemInfo.graphicsDeviceID

显卡标识符

3 显卡类型 SystemInfo.graphicsDeviceType

显卡类型,它是一个枚举

public enum GraphicsDeviceType
{
    
    
   OpenGL2 = 0,   //OpenGL 2.x graphics API.
   Direct3D9 = 1, //Direct3D 9 graphics API.
   Direct3D11 = 2,
   PlayStation3 = 3,
   Null = 4,
   Xbox360 = 6,
   OpenGLES2 = 8,
   OpenGLES3 = 11,
   PlayStationVita = 12,
   PlayStation4 = 13,
   XboxOne = 14,
   PlayStationMobile = 15,
   Metal = 16,
   OpenGLCore = 17,
   Direct3D12 = 18,
   Nintendo3DS = 19
}

4 显卡厂商 SystemInfo.graphicsDeviceVendor

显卡厂商,例:QualcommATI

5 显卡厂商ID SystemInfo.graphicsDeviceVendorID

显卡厂商ID

6 显卡支持版本 SystemInfo.graphicsDeviceVersion

显卡支持版本

7 显存 SystemInfo.graphicsMemorySize

显存,单位M

8 像素填充率 SystemInfo.graphicsPixelFillrate

显卡像素填充率(百万像素/秒),-1未知填充率

9 SystemInfo.graphicsShaderLevel

显卡支持Shader层级

10 SystemInfo.maxTextureSize

支持最大图片尺寸

11 SystemInfo.graphicsMultiThreaded

显卡是否支持多线程渲染

三、内存 SystemInfo.systemMemorySize

内存大小,单位M

四、操作系统SystemInfo.operatingSystem

操作系统,例:Android OS 7.0/API-24(NRD90M/7.3.2)iPhone OS 9.3.3

五、CPU

1 SystemInfo.processorCount

CPU处理核数

2 SystemInfo.processorType

CPU类型

猜你喜欢

转载自blog.csdn.net/linxinfa/article/details/107528863