首页 技术 正文
技术 2022年11月19日
0 收藏 691 点赞 3,115 浏览 2877 个字

我觉得用Unity 开发最爽的地方, 不是unity跨平台,而是用其他语言,要用很复杂的逻辑才能完成的功能,unity用一两句代码就能搞定

就比如说获取Android 系统的电量,不用发广播,不用申请权限,一句 SystemInfo.batteryLevel 轻松搞定。

关于设备信息,我们可以通过 SystemInfo类 来获得

Static Properties

batteryLevel 当前电量 (Read Only).
batteryStatus 返回电池的状态,是否在充电等 (Read Only).
copyTextureSupport 支持Graphics.CopyTexture的种类 (Read Only).
deviceModel The model of the device (Read Only).
deviceName The user defined name of the device (Read Only).
deviceType 返回本应用程序所正在运行的设备(Read Only).
deviceUniqueIdentifier 返回设备的唯一标识符 (Read Only).
graphicsDeviceID 图形设备的标识符
graphicsDeviceName 图形设备的名称
graphicsDeviceType The graphics API type used by the graphics device (Read Only).
graphicsDeviceVendor The vendor of the graphics device (Read Only).
graphicsDeviceVendorID The identifier code of the graphics device vendor (Read Only).
graphicsDeviceVersion The graphics API type and driver version used by the graphics device (Read Only).
graphicsMemorySize Amount of video memory present (Read Only).
graphicsMultiThreaded Is graphics device using multi-threaded rendering (Read Only)?
graphicsShaderLevel Graphics device shader capability level (Read Only).
graphicsUVStartsAtTop Returns true if the texture UV coordinate convention for this platform has Y starting at the top of the image.
maxCubemapSize Maximum Cubemap texture size (Read Only).
maxTextureSize Maximum texture size (Read Only).
npotSupport What NPOT (non-power of two size) texture support does the GPU provide? (Read Only)
operatingSystem Operating system name with version (Read Only).
operatingSystemFamily Returns the operating system family the game is running on (Read Only).
processorCount Number of processors present (Read Only).
processorFrequency Processor frequency in MHz (Read Only).
processorType Processor name (Read Only).
supportedRenderTargetCount How many simultaneous render targets (MRTs) are supported? (Read Only)
supports2DArrayTextures Are 2D Array textures supported? (Read Only)
supports3DRenderTextures Are 3D (volume) RenderTextures supported? (Read Only)
supports3DTextures Are 3D (volume) textures supported? (Read Only)
supportsAccelerometer Is an accelerometer available on the device?
supportsAudio Is there an Audio device available for playback?
supportsComputeShaders Are compute shaders supported? (Read Only)
supportsCubemapArrayTextures Are Cubemap Array textures supported? (Read Only)
supportsGyroscope Is a gyroscope available on the device?
supportsImageEffects Are image effects supported? (Read Only)
supportsInstancing Is GPU draw call instancing supported? (Read Only)
supportsLocationService Is the device capable of reporting its location?
supportsMotionVectors Whether motion vectors are supported on this platform.
supportsRawShadowDepthSampling Is sampling raw depth from shadowmaps supported? (Read Only)
supportsRenderToCubemap Are cubemap render textures supported? (Read Only)
supportsShadows Are built-in shadows supported? (Read Only)
supportsSparseTextures Are sparse textures supported? (Read Only)
supportsVibration 是否支持震动
systemMemorySize 内存大小
unsupportedIdentifier Value returned by SystemInfo string properties which are not supported on the current platform.
usesReversedZBuffer 如果当前平台使用反向深度缓冲区(取值范围从1附近的平面和0到远平面),如果深度缓冲区是正常的(0在附近,1则远),则此属性为true。(只读)
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,082
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,557
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,406
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,179
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,815
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,898