示例#1
0
        public SystemInfoKun(bool isSet)
        {
            if (isSet)
            {
                batteryLevel           = SystemInfo.batteryLevel;
                batteryStatus          = SystemInfo.batteryStatus;
                copyTextureSupport     = SystemInfo.copyTextureSupport;
                deviceModel            = SystemInfo.deviceModel;
                deviceName             = SystemInfo.deviceName;
                deviceType             = SystemInfo.deviceType;
                deviceUniqueIdentifier = SystemInfo.deviceUniqueIdentifier;
                graphicsDeviceID       = SystemInfo.graphicsDeviceID;
                graphicsDeviceName     = SystemInfo.graphicsDeviceName;
                graphicsDeviceType     = SystemInfo.graphicsDeviceType;
                graphicsDeviceVendor   = SystemInfo.graphicsDeviceVendor;
                graphicsDeviceVendorID = SystemInfo.graphicsDeviceVendorID;
                graphicsDeviceVersion  = SystemInfo.graphicsDeviceVersion;
                graphicsMemorySize     = SystemInfo.graphicsMemorySize;
                graphicsMultiThreaded  = SystemInfo.graphicsMultiThreaded;
                graphicsShaderLevel    = SystemInfo.graphicsShaderLevel;
                graphicsUVStartsAtTop  = SystemInfo.graphicsUVStartsAtTop;
                hasDynamicUniformArrayIndexingInFragmentShaders = SystemInfo.hasDynamicUniformArrayIndexingInFragmentShaders;
                hasHiddenSurfaceRemovalOnGPU = SystemInfo.hasHiddenSurfaceRemovalOnGPU;
                hasMipMaxLevel = SystemInfo.hasMipMaxLevel;
                maxComputeBufferInputsCompute  = SystemInfo.maxComputeBufferInputsCompute;
                maxComputeBufferInputsDomain   = SystemInfo.maxComputeBufferInputsDomain;
                maxComputeBufferInputsFragment = SystemInfo.maxComputeBufferInputsFragment;
                maxComputeBufferInputsGeometry = SystemInfo.maxComputeBufferInputsGeometry;
                maxComputeBufferInputsHull     = SystemInfo.maxComputeBufferInputsHull;
                maxComputeBufferInputsVertex   = SystemInfo.maxComputeBufferInputsVertex;
                maxComputeWorkGroupSize        = SystemInfo.maxComputeWorkGroupSize;
                maxComputeWorkGroupSizeX       = SystemInfo.maxComputeWorkGroupSizeX;
                maxComputeWorkGroupSizeY       = SystemInfo.maxComputeWorkGroupSizeY;
                maxComputeWorkGroupSizeZ       = SystemInfo.maxComputeWorkGroupSizeX;
                maxCubemapSize = SystemInfo.maxCubemapSize;
                maxTextureSize = SystemInfo.maxTextureSize;
#if UNITY_2020_1_OR_NEWER
                constantBufferOffsetAlignment = SystemInfo.constantBufferOffsetAlignment;
#else
                minConstantBufferOffsetAlignment = SystemInfo.minConstantBufferOffsetAlignment;
#endif
                npotSupport                         = SystemInfo.npotSupport;
                operatingSystem                     = SystemInfo.operatingSystem;
                operatingSystemFamily               = SystemInfo.operatingSystemFamily;
                processorCount                      = SystemInfo.processorCount;
                processorFrequency                  = SystemInfo.processorFrequency;
                processorType                       = SystemInfo.processorType;
                renderingThreadingMode              = SystemInfo.renderingThreadingMode;
                supportedRandomWriteTargetCount     = SystemInfo.supportedRenderTargetCount;
                supportedRenderTargetCount          = SystemInfo.supportedRenderTargetCount;
                supports2DArrayTextures             = SystemInfo.supports2DArrayTextures;
                supports32bitsIndexBuffer           = SystemInfo.supports32bitsIndexBuffer;
                supports3DRenderTextures            = SystemInfo.supports3DRenderTextures;
                supports3DTextures                  = SystemInfo.supports3DTextures;
                supportsAccelerometer               = SystemInfo.supportsAccelerometer;
                supportsAsyncCompute                = SystemInfo.supportsAsyncCompute;
                supportsAsyncGPUReadback            = SystemInfo.supportsAsyncGPUReadback;
                supportsAudio                       = SystemInfo.supportsAudio;
                supportsComputeShaders              = SystemInfo.supportsComputeShaders;
                supportsCubemapArrayTextures        = SystemInfo.supportsCubemapArrayTextures;
                supportsGeometryShaders             = SystemInfo.supportsGeometryShaders;
                supportsGraphicsFence               = SystemInfo.supportsGraphicsFence;
                supportsGyroscope                   = SystemInfo.supportsGyroscope;
                supportsHardwareQuadTopology        = SystemInfo.supportsHardwareQuadTopology;
                supportsInstancing                  = SystemInfo.supportsInstancing;
                supportsLocationService             = SystemInfo.supportsLocationService;
                supportsMipStreaming                = SystemInfo.supportsMipStreaming;
                supportsMotionVectors               = SystemInfo.supportsMotionVectors;
                supportsMultisampleAutoResolve      = SystemInfo.supportsMultisampleAutoResolve;
                supportsMultisampledTextures        = SystemInfo.supportsMultisampledTextures;
                supportsRawShadowDepthSampling      = SystemInfo.supportsRawShadowDepthSampling;
                supportsRayTracing                  = SystemInfo.supportsRayTracing;
                supportsSeparatedRenderTargetsBlend = SystemInfo.supportsSeparatedRenderTargetsBlend;
                supportsSetConstantBuffer           = SystemInfo.supportsSetConstantBuffer;
                supportsShadows                     = SystemInfo.supportsShadows;
                supportsSparseTextures              = SystemInfo.supportsSparseTextures;
                supportsTessellationShaders         = SystemInfo.supportsTessellationShaders;
                supportsTextureWrapMirrorOnce       = SystemInfo.supportsTextureWrapMirrorOnce;
                supportsVibration                   = SystemInfo.supportsVibration;
                systemMemorySize                    = SystemInfo.systemMemorySize;
                unsupportedIdentifier               = SystemInfo.unsupportedIdentifier;
                usesLoadStoreActions                = SystemInfo.usesLoadStoreActions;
                usesReversedZBuffer                 = SystemInfo.usesReversedZBuffer;
            }
            else
            {
                deviceModel            = "";
                deviceName             = "";
                deviceUniqueIdentifier = "";
                graphicsDeviceName     = "";
                graphicsDeviceVendor   = "";
                graphicsDeviceVersion  = "";
                operatingSystem        = "";
                processorType          = "";
                unsupportedIdentifier  = "";
            }
        }
示例#2
0
        public virtual void Deserialize(BinaryReader binaryReader)
        {
            batteryLevel           = binaryReader.ReadSingle();
            batteryStatus          = (BatteryStatus)binaryReader.ReadInt32();
            copyTextureSupport     = (UnityEngine.Rendering.CopyTextureSupport)binaryReader.ReadInt32();
            deviceModel            = binaryReader.ReadString();
            deviceName             = binaryReader.ReadString();
            deviceType             = (DeviceType)binaryReader.ReadInt32();
            deviceUniqueIdentifier = binaryReader.ReadString();
            graphicsDeviceID       = binaryReader.ReadInt32();
            graphicsDeviceName     = binaryReader.ReadString();
            graphicsDeviceType     = (UnityEngine.Rendering.GraphicsDeviceType)binaryReader.ReadInt32();
            graphicsDeviceVendor   = binaryReader.ReadString();
            graphicsDeviceVendorID = binaryReader.ReadInt32();
            graphicsDeviceVersion  = binaryReader.ReadString();
            graphicsMemorySize     = binaryReader.ReadInt32();
            graphicsMultiThreaded  = binaryReader.ReadBoolean();
            graphicsShaderLevel    = binaryReader.ReadInt32();
            graphicsUVStartsAtTop  = binaryReader.ReadBoolean();
            hasDynamicUniformArrayIndexingInFragmentShaders = binaryReader.ReadBoolean();
            hasHiddenSurfaceRemovalOnGPU = binaryReader.ReadBoolean();
            hasMipMaxLevel = binaryReader.ReadBoolean();
            maxComputeBufferInputsCompute  = binaryReader.ReadInt32();
            maxComputeBufferInputsDomain   = binaryReader.ReadInt32();
            maxComputeBufferInputsFragment = binaryReader.ReadInt32();
            maxComputeBufferInputsGeometry = binaryReader.ReadInt32();
            maxComputeBufferInputsHull     = binaryReader.ReadInt32();
            maxComputeBufferInputsVertex   = binaryReader.ReadInt32();
            maxComputeWorkGroupSize        = binaryReader.ReadInt32();
            maxComputeWorkGroupSizeX       = binaryReader.ReadInt32();
            maxComputeWorkGroupSizeY       = binaryReader.ReadInt32();
            maxComputeWorkGroupSizeZ       = binaryReader.ReadInt32();
            maxCubemapSize = binaryReader.ReadInt32();
            maxTextureSize = binaryReader.ReadInt32();
#if UNITY_2020_1_OR_NEWER
            constantBufferOffsetAlignment = binaryReader.ReadInt32();
#else
            minConstantBufferOffsetAlignment = binaryReader.ReadBoolean();
#endif
            npotSupport                         = (NPOTSupport)binaryReader.ReadInt32();
            operatingSystem                     = binaryReader.ReadString();
            operatingSystemFamily               = (OperatingSystemFamily)binaryReader.ReadInt32();
            processorCount                      = binaryReader.ReadInt32();
            processorFrequency                  = binaryReader.ReadInt32();
            processorType                       = binaryReader.ReadString();
            renderingThreadingMode              = (UnityEngine.Rendering.RenderingThreadingMode)binaryReader.ReadInt32();
            supportedRandomWriteTargetCount     = binaryReader.ReadInt32();
            supportedRenderTargetCount          = binaryReader.ReadInt32();
            supports2DArrayTextures             = binaryReader.ReadBoolean();
            supports32bitsIndexBuffer           = binaryReader.ReadBoolean();
            supports3DRenderTextures            = binaryReader.ReadBoolean();
            supports3DTextures                  = binaryReader.ReadBoolean();
            supportsAccelerometer               = binaryReader.ReadBoolean();
            supportsAsyncCompute                = binaryReader.ReadBoolean();
            supportsAsyncGPUReadback            = binaryReader.ReadBoolean();
            supportsAudio                       = binaryReader.ReadBoolean();
            supportsComputeShaders              = binaryReader.ReadBoolean();
            supportsCubemapArrayTextures        = binaryReader.ReadBoolean();
            supportsGeometryShaders             = binaryReader.ReadBoolean();
            supportsGraphicsFence               = binaryReader.ReadBoolean();
            supportsGyroscope                   = binaryReader.ReadBoolean();
            supportsHardwareQuadTopology        = binaryReader.ReadBoolean();
            supportsInstancing                  = binaryReader.ReadBoolean();
            supportsLocationService             = binaryReader.ReadBoolean();
            supportsMipStreaming                = binaryReader.ReadBoolean();
            supportsMotionVectors               = binaryReader.ReadBoolean();
            supportsMultisampleAutoResolve      = binaryReader.ReadBoolean();
            supportsMultisampledTextures        = binaryReader.ReadInt32();
            supportsRawShadowDepthSampling      = binaryReader.ReadBoolean();
            supportsRayTracing                  = binaryReader.ReadBoolean();
            supportsSeparatedRenderTargetsBlend = binaryReader.ReadBoolean();
            supportsSetConstantBuffer           = binaryReader.ReadBoolean();
            supportsShadows                     = binaryReader.ReadBoolean();
            supportsSparseTextures              = binaryReader.ReadBoolean();
            supportsTessellationShaders         = binaryReader.ReadBoolean();
            supportsTextureWrapMirrorOnce       = binaryReader.ReadInt32();
            supportsVibration                   = binaryReader.ReadBoolean();
            systemMemorySize                    = binaryReader.ReadInt32();
            unsupportedIdentifier               = binaryReader.ReadString();
            usesLoadStoreActions                = binaryReader.ReadBoolean();
            usesReversedZBuffer                 = binaryReader.ReadBoolean();
        }