SystemInfo获取系统参数
生活随笔
收集整理的這篇文章主要介紹了
SystemInfo获取系统参数
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
System類可以指出Unity項(xiàng)目的一些設(shè)備信息。
一些常用的靜態(tài)屬性:
SystemInfo.deviceModel //設(shè)備模型(string) SystemInfo.deviceName //設(shè)備名稱(string) SystemInfo.deviceType //設(shè)備類型(enum) public enum DeviceType {Unknown = 0,Handheld = 1, //手持設(shè)備,如手機(jī),平板Console = 2, //游戲機(jī)Desktop = 3 //臺式電腦,筆記本電腦 } SystemInfo.systemMemorySize //系統(tǒng)內(nèi)存大小MB(int) SystemInfo.operatingSystem //操作系統(tǒng)(string) SystemInfo.deviceUniqueIdentifier //設(shè)備唯一標(biāo)識符(string) SystemInfo.graphicsDeviceID //顯卡ID(int) SystemInfo.graphicsDeviceName //顯卡名稱(string) SystemInfo.graphicsDeviceType //顯卡類型(enum) 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 } SystemInfo.graphicsDeviceVendor //顯卡供應(yīng)商(string) SystemInfo.graphicsDeviceVendorID //顯卡供應(yīng)唯一ID(int) SystemInfo.graphicsDeviceVersion //顯卡版本號(int) SystemInfo.graphicsMemorySize //顯存大小MB(int) SystemInfo.graphicsMultiThreaded //顯卡是否支持多線程渲染(bool) SystemInfo.supportedRenderTargetCount //支持的渲染目標(biāo)數(shù)量(int)案例:
1/ 在聯(lián)想筆記本電腦Unity編輯器中里:(轉(zhuǎn)成string后打印)
2/ 在聯(lián)想筆記本電腦exe中:(轉(zhuǎn)成string后打印)
//其他都一樣,顯卡不一樣,可能是雙顯的原因: 設(shè)備唯一標(biāo)識符:024637c25cad463cff9cb08a***************(一長串) 顯卡ID:26656 顯卡名稱:AMD Radeon(TM)R9 M375 顯卡類型:Direct3D11 顯卡供應(yīng)商:ATI 顯卡供應(yīng)唯一ID:4098 顯卡版本號:Direct3D 11.0[level 11.0] 顯存大小MB:2026 顯卡是否支持多線程渲染:True 支持的渲染目標(biāo)數(shù)量:83/ 在小米手機(jī)(安卓)里:(轉(zhuǎn)成string后打印)
設(shè)備模型:Xiaomi MI 5 設(shè)備名稱:<unknown> 設(shè)備類型(PC電腦,掌上型):Handheld 系統(tǒng)內(nèi)存大小MB:2711 操作系統(tǒng):Android OS 7.0/API-24(NRD90M/7.3.2) 設(shè)備唯一標(biāo)識符:40d4637c25cad463cff9cb*************(一長串保密) 顯卡ID:0 顯卡名稱:Adreno(TM)530 顯卡類型:OpenGLES3 顯卡供應(yīng)商:Qualcomm 顯卡供應(yīng)唯一ID:0 顯卡版本號:OpenGL ES 3.2 V@145.0(GIT@lc27b94dfce) 顯存大小MB:1024 顯卡是否支持多線程渲染:False 支持的渲染目標(biāo)數(shù)量:84/ 在蘋果手機(jī)(IOS)里:(轉(zhuǎn)成string后打印)
設(shè)備模型:iPhone6,2 設(shè)備名稱:鱷魚淚的iPhone 設(shè)備類型(PC電腦,掌上型):Handheld 系統(tǒng)內(nèi)存大小MB:1000 操作系統(tǒng):iPhone OS 9.3.3 設(shè)備唯一標(biāo)識符:E6*************************(一長串保密) 顯卡ID:0 顯卡名稱:Apple A7 GPU 顯卡類型:Metal 顯卡供應(yīng)商:Apple 顯卡供應(yīng)唯一ID:0 顯卡版本號:Metal 顯存大小MB:256 顯卡是否支持多線程渲染:True 支持的渲染目標(biāo)數(shù)量:4注:一般用到的就是這些,除此之外的,可以參考官方文檔。
總結(jié)
以上是生活随笔為你收集整理的SystemInfo获取系统参数的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python画出送花表情图编程_pyth
- 下一篇: 用scribefire写blog