当前位置: 首页 > news >正文

Unity3D的SystemInfo类,获取运行设备硬件信息(CPU、显卡、类型等)可用于手机...

 版权声明:本文为博主原创文章,未经博主允许不得转载。

https://blog.csdn.net/u010377179/article/details/52618597

转载请注明出处!

 

  近期才发现Unity3D还有一个访问硬件设备信息的类SystemInfo。
概述:
     UnityEngine.SystemInfo类中的属性都是只读属性,存储着运行平台的一些硬件信息,找出底层平台和硬件的功能,如:设备的名称、设备的类型、显卡的类型,显卡的名称、显卡供应商(制造商)、系统内存大小、显存大小、支持的渲染目标数量等等。我们也可以检查支持哪些RenderTexture(渲染纹理)格式(SupportsRenderTextureFormat),CPU有多少可用的线程的(processorCount)等等。
 
SystemInfo类中的静态变量:
 
中文显示:
Rendering.CopyTextureSupport copyTextureSupport:(只读)支持多种复制纹理功能的情况。
string  deviceModel:(只读)设备的模型或模式。
string  deviceName:(只读)用户定义的设备名称。
DeviceType  deviceType:(只读)返回程序运行所在的设备类型(PC电脑、掌上型等)。
string  deviceUniqueIdentifier:(只读)设备的唯一标识符。每一台设备都有唯一的标识符。
int   graphicsDeviceID:(只读)显卡的唯一标识符ID。
string  graphicsDeviceName:(只读)显卡的名称。
Rending.GraphicsDeviceType  graphicsDeviceType:(只读)显卡的类型。
string   graphicsDeviceVendor:(只读)显卡的供应商。
int   graphicsDeviceVendorID:(只读)显卡供应商的唯一识别码ID。
string   graphicsDeviceVersion:(只读)显卡的类型和版本。
int   graphicsMemorySize:(只读)显存大小。
bool  graphicsMultiThreaded:(只读)是否支持多线程渲染?
int   graphicsShaderLevel:(只读)显卡着色器的级别。
int   maxTextureSize:(只读)支持的最大纹理大小。
NPOTSupport  npotSupport:(只读)GPU支持的NPOT纹理。
string  operatingSystem:(只读)操作系统的版本名称。
int   processorCount:(只读)当前处理器的数量。
int   processorFrequency:(只读)处理器的频率。
string  processorType:(只读)处理器的名称。
int   supportedRenderTargetCount:(只读)支持渲染多少目标纹理。
bool  supports2DArrayTextures:(只读)是否支持2D数组纹理。
bool  supports3DTextures:(只读)是否支持3D(体积)纹理。
bool  supportsAccelerometer:(只读)是否支持获取加速度计。
bool  supportsAudio:(只读)是否支持获取用于回放的音频设备。
bool  supportsComputeShaders:(只读)是否支持计算着色器。
bool  supportsGyroscope:是否支持获取陀螺仪。
bool  supportsImageEffects:(只读)是否支持图形特效。
bool  supportsInstancing:(只读)是否支持实例化GPU的Draw Call。
bool  supportsLocationService:是否支持定位功能。
bool  supportsMotionVectors:是否支持运动向量。
bool  supportsRawShadowDepthSampling:(只读)是否支持阴影深度。
bool  supportsRenderTextures:(只读)是否支持渲染纹理。
bool  supportsRenderToCubemap:(只读)是否支持立方体纹理。
bool  supportsShadows:(只读)是否支持内置阴影。
bool  supportsSparseTextures:(只读)是否支持稀疏纹理。
bool  supportsStencil:(只读)是否支持模版缓存。
bool  supportsVibration:是否支持用户触摸震动反馈。
int   systemMemorySize:(只读)系统内存大小。
string   unsupportedIdentifier:不支持运行在当前设备的SystemInfo属性值。
 
官方文档英文显示:
copyTextureSupportSupport for various Graphics.CopyTexture cases (Read Only).
deviceModelThe model of the device (Read Only).
deviceNameThe user defined name of the device (Read Only).
deviceTypeReturns the kind of device the application is running on (Read Only).
deviceUniqueIdentifierA unique device identifier. It is guaranteed to be unique for every device (Read Only).
graphicsDeviceIDThe identifier code of the graphics device (Read Only).
graphicsDeviceNameThe name of the graphics device (Read Only).
graphicsDeviceTypeThe graphics API type used by the graphics device (Read Only).
graphicsDeviceVendorThe vendor of the graphics device (Read Only).
graphicsDeviceVendorIDThe identifier code of the graphics device vendor (Read Only).
graphicsDeviceVersionThe graphics API type and driver version used by the graphics device (Read Only).
graphicsMemorySizeAmount of video memory present (Read Only).
graphicsMultiThreadedIs graphics device using multi-threaded rendering (Read Only)?
graphicsShaderLevelGraphics device shader capability level (Read Only).
maxTextureSizeMaximum texture size (Read Only).
npotSupportWhat NPOT (non-power of two size) texture support does the GPU provide? (Read Only)
operatingSystemOperating system name with version (Read Only).
processorCountNumber of processors present (Read Only).
processorFrequencyProcessor frequency in MHz (Read Only).
processorTypeProcessor name (Read Only).
supportedRenderTargetCountHow many simultaneous render targets (MRTs) are supported? (Read Only)
supports2DArrayTexturesAre 2D Array textures supported? (Read Only)
supports3DTexturesAre 3D (volume) textures supported? (Read Only)
supportsAccelerometerIs an accelerometer available on the device?
supportsAudioIs there an Audio device available for playback?
supportsComputeShadersAre compute shaders supported? (Read Only)
supportsGyroscopeIs a gyroscope available on the device?
supportsImageEffectsAre image effects supported? (Read Only)
supportsInstancingIs GPU draw call instancing supported? (Read Only)
supportsLocationServiceIs the device capable of reporting its location?
supportsMotionVectorsAre motion vectors supported.
supportsRawShadowDepthSamplingIs sampling raw depth from shadowmaps supported? (Read Only)
supportsRenderTexturesAre render textures supported? (Read Only)
supportsRenderToCubemapAre cubemap render textures supported? (Read Only)
supportsShadowsAre built-in shadows supported? (Read Only)
supportsSparseTexturesAre sparse textures supported? (Read Only)
supportsStencilIs the stencil buffer supported? (Read Only)
supportsVibrationIs the device capable of providing the user haptic feedback by vibration?
systemMemorySizeAmount of system memory present (Read Only).
unsupportedIdentifierValue returned by SystemInfo string properties which are not supported on the current platform.
SystemInfo类中的函数:
 
bool SupportsRenderTextureFormat( RenderTextureFormat format);
输入一个渲染纹理的格式,判断设备是否支持这种格式
 
bool SupportsTextureFormat( TextureFormat format);
输入一个纹理的格式,判断设备是否支持这种格式。

转载于:https://www.cnblogs.com/cyct/p/11151166.html

相关文章:

  • jenkins(十六):Jenkins执行脚本
  • java8 两个list 求差集
  • 本地 生成 ssh
  • 7.9
  • android sdk manager 假如不能从官方下载或者很慢,可以参照下面的网址
  • 网卡IP配置切换,献给经常更改IP的哥们—以前原创(四)
  • Excel中减少两边的字符
  • Unity3D笔记八 Unity生命周期及动画学习
  • Tastypie与Backbone交互
  • BFS 、DFS 解决迷宫入门问题
  • STM32之独立看门狗与窗口看门狗总结
  • zoj3713 7Bit
  • USACO Healthy Holsteins DFS
  • 易经读书笔记16 雷地豫
  • 【MM系列】MB1A MB1B MB1C MB11 MIGO的区别解析
  • 4个实用的微服务测试策略
  • Brief introduction of how to 'Call, Apply and Bind'
  • echarts的各种常用效果展示
  • iOS 系统授权开发
  • javascript面向对象之创建对象
  • Mybatis初体验
  • Python 反序列化安全问题(二)
  • SAP云平台里Global Account和Sub Account的关系
  • underscore源码剖析之整体架构
  • 程序员该如何有效的找工作?
  • 从零开始的无人驾驶 1
  • 动态规划入门(以爬楼梯为例)
  • 工程优化暨babel升级小记
  • 工作手记之html2canvas使用概述
  • 前端面试总结(at, md)
  • 使用putty远程连接linux
  • 我看到的前端
  • 3月27日云栖精选夜读 | 从 “城市大脑”实践,瞭望未来城市源起 ...
  • ​configparser --- 配置文件解析器​
  • ​决定德拉瓦州地区版图的关键历史事件
  • # 睡眠3秒_床上这样睡觉的人,睡眠质量多半不好
  • #android不同版本废弃api,新api。
  • #laravel 通过手动安装依赖PHPExcel#
  • (09)Hive——CTE 公共表达式
  • (2)STM32单片机上位机
  • (2/2) 为了理解 UWP 的启动流程,我从零开始创建了一个 UWP 程序
  • (52)只出现一次的数字III
  • (附源码)springboot 房产中介系统 毕业设计 312341
  • (附源码)ssm本科教学合格评估管理系统 毕业设计 180916
  • (十五)devops持续集成开发——jenkins流水线构建策略配置及触发器的使用
  • (转)c++ std::pair 与 std::make
  • .NET MVC、 WebAPI、 WebService【ws】、NVVM、WCF、Remoting
  • .NET 程序如何获取图片的宽高(框架自带多种方法的不同性能)
  • .NET/C# 避免调试器不小心提前计算本应延迟计算的值
  • .NET6使用MiniExcel根据数据源横向导出头部标题及数据
  • .net网站发布-允许更新此预编译站点
  • .net下的富文本编辑器FCKeditor的配置方法
  • .net中应用SQL缓存(实例使用)
  • .vue文件怎么使用_vue调试工具vue-devtools的安装
  • @angular/cli项目构建--http(2)