public static THDeviceOs ToRpcModel(this OperatingSystemFamily operatingSystemFamily) { #if UNITY_EDITOR return(THDeviceOs.UNITY_EDITOR); #else return(new Dictionary <OperatingSystemFamily, THDeviceOs> { { OperatingSystemFamily.MacOSX, THDeviceOs.DESKTOP_MAC }, { OperatingSystemFamily.Windows, THDeviceOs.DESKTOP_WINDOWS }, { OperatingSystemFamily.Linux, THDeviceOs.DESKTOP_LINUX }, { OperatingSystemFamily.Other, THDeviceOs.OTHER }, }[operatingSystemFamily]); #endif }
public void FillDefaults(OperatingSystemFamily os, string user) { if (os == OperatingSystemFamily.Windows && user == "Nick") { enabled = true; settings.refresher.mode = TBH_Refresher.Mode.DELAYED; settings.refresher.delay = 40; settings.hotkeys.enabled = true; settings.hotkeys.deselect.key = KeyCode.Escape; settings.hotkeys.frame.key = KeyCode.F7; settings.hotkeys.frame.alt = true; settings.hotkeys.frame.ctrl = true; settings.hotkeys.cycleTools.key = KeyCode.F7; settings.hotkeys.cycleTools.ctrl = true; settings.hotkeys.noTool.key = KeyCode.F8; settings.hotkeys.noTool.ctrl = true; } }
public static string PrintSystemInfo() { string deviceName = SystemInfo.deviceName; string deviceModel = SystemInfo.deviceModel; DeviceType deviceType = SystemInfo.deviceType; string id = SystemInfo.deviceUniqueIdentifier; string os = SystemInfo.operatingSystem; OperatingSystemFamily osFamily = SystemInfo.operatingSystemFamily; string ram = (SystemInfo.systemMemorySize / 1024f) + " GiB"; string cpuName = SystemInfo.processorType; int cpuCount = SystemInfo.processorCount; int cpuFrequency = SystemInfo.processorFrequency; GraphicsDeviceType gpuType = SystemInfo.graphicsDeviceType; string gpuName = SystemInfo.graphicsDeviceName; string gpuVendor = SystemInfo.graphicsDeviceVendor; string gpuRam = (SystemInfo.graphicsMemorySize / 1024f) + " GiB"; int padding = 23; StringBuilder text = new StringBuilder(); text.AppendLine("<b>Device</b>"); text.AppendLine("\t<b>OS</b>".PadRight(padding) + os + "(" + osFamily + ")"); text.AppendLine("\t<b>RAM</b>".PadRight(padding) + ram); text.AppendLine("\t<b>Name</b>".PadRight(padding) + deviceName); text.AppendLine("\t<b>Model</b>".PadRight(padding) + deviceModel); text.AppendLine("\t<b>Type</b>".PadRight(padding) + deviceType); text.AppendLine("\t<b>Unique ID</b>".PadRight(padding) + id); text.AppendLine("<b>CPU</b>"); text.AppendLine("\t<b>Name</b>".PadRight(padding) + cpuName); text.AppendLine("\t<b>Processors</b>".PadRight(padding) + cpuCount); text.AppendLine("\t<b>Frequency</b>".PadRight(padding) + cpuFrequency); text.AppendLine("<b>GPU</b>"); text.AppendLine("\t<b>Name</b>".PadRight(padding) + gpuName); text.AppendLine("\t<b>Type</b>".PadRight(padding) + gpuType); text.AppendLine("\t<b>Vendor</b>".PadRight(padding) + gpuVendor); text.AppendLine("\t<b>Memory</b>".PadRight(padding) + gpuRam); return(text.ToString()); }
// Start is called before the first frame update void Start() { _control = Control.Keyboard; _os = SystemInfo.operatingSystemFamily; switch (_os) { case OperatingSystemFamily.Windows: print("I'm on Windows"); break; case OperatingSystemFamily.MacOSX: print("I'm on Mac OS"); break; default: print("I'm on Linux"); break; } }
public static void PrintSystemInfo() { string deviceName = SystemInfo.deviceName; string deviceModel = SystemInfo.deviceModel; DeviceType deviceType = SystemInfo.deviceType; string id = SystemInfo.deviceUniqueIdentifier; string os = SystemInfo.operatingSystem; OperatingSystemFamily osFamily = SystemInfo.operatingSystemFamily; string ram = (SystemInfo.systemMemorySize / 1000f) + " gb"; string cpuName = SystemInfo.processorType; int cpuCount = SystemInfo.processorCount; int cpuFrequency = SystemInfo.processorFrequency; GraphicsDeviceType gpuType = SystemInfo.graphicsDeviceType; string gpuName = SystemInfo.graphicsDeviceName; string gpuVendor = SystemInfo.graphicsDeviceVendor; string gpuRam = (SystemInfo.graphicsMemorySize / 1000f) + " gb"; int padding = 23; Console.Print("<b>Device</b>"); Console.Print("\t<b>OS</b>".PadRight(padding) + os + "(" + osFamily + ")"); Console.Print("\t<b>RAM</b>".PadRight(padding) + ram); Console.Print("\t<b>Name</b>".PadRight(padding) + deviceName); Console.Print("\t<b>Model</b>".PadRight(padding) + deviceModel); Console.Print("\t<b>Type</b>".PadRight(padding) + deviceType); Console.Print("\t<b>Unique ID</b>".PadRight(padding) + id); Console.Print("<b>CPU</b>"); Console.Print("\t<b>Name</b>".PadRight(padding) + cpuName); Console.Print("\t<b>Processors</b>".PadRight(padding) + cpuCount); Console.Print("\t<b>Frequency</b>".PadRight(padding) + SystemInfo.processorFrequency); Console.Print("<b>GPU</b>"); Console.Print("\t<b>Name</b>".PadRight(padding) + gpuName); Console.Print("\t<b>Vendor</b>".PadRight(padding) + gpuVendor); Console.Print("\t<b>Memory</b>".PadRight(padding) + gpuRam); }
void Start() { if (isLocalPlayer) { os = SystemInfo.operatingSystemFamily; if (Application.isEditor) { base_dir = Directory.GetCurrentDirectory(); } else { base_dir = AppDomain.CurrentDomain.BaseDirectory; } agent = GetComponent <NavMeshAgent>(); local_navmesh_network = GetComponent <LocalNavMeshNetworkProxy>(); equipment_controller = GetComponent <EquipmentController>(); bag = GetComponent <Bag>(); rotator = GetComponent <CharacterRotator>(); new Script(); //Only to make sure script env dll is loaded on main thread. update_script_data(); cancel_source = new CancellationTokenSource(); { //Try to execute the environment over and over again var thread = new Thread(run_env); thread.Name = "Player Scripting Env"; thread.IsBackground = true; thread.Start(); } { //Create a temporary file and open that with the zerobrane editor var thread = code_updater_thread = new Thread(code_editor_watcher); thread.Name = "Code Editor Watcher"; thread.IsBackground = true; thread.Start(); } } }
private void Awake() { operatingSystemFamily = SystemInfo.operatingSystemFamily; }
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 = ""; } }
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(); }
public abstract void BeginCompiling(AssemblyInfo assemblyInfo, string[] responseFiles, OperatingSystemFamily operatingSystemFamily, string[] systemReferenceDirectories);