private void CreateDefaultSet() { _info.Add("System", new[] { Info.Create("Operating System", SystemInfo.operatingSystem, false), Info.Create("Device Name", SystemInfo.deviceName, true), Info.Create("Device Type", SystemInfo.deviceType, false), Info.Create("Device Model", SystemInfo.deviceModel, false), Info.Create("CPU Type", SystemInfo.processorType, false), Info.Create("CPU Count", SystemInfo.processorCount, false), Info.Create("System Memory", SRFileUtil.GetBytesReadable(((long)SystemInfo.systemMemorySize) * 1024 * 1024), false) //Info.Create("Process Name", () => Process.GetCurrentProcess().ProcessName) }); _info.Add("Unity", new[] { Info.Create("Version", Application.unityVersion, false), Info.Create("Debug", Debug.isDebugBuild, false), Info.Create("Unity Pro", Application.HasProLicense(), false), Info.Create("Genuine", "{0} ({1})".Fmt(Application.genuine ? "Yes" : "No", Application.genuineCheckAvailable ? "Trusted" : "Untrusted"), false), Info.Create("System Language", Application.systemLanguage, false), Info.Create("Platform", Application.platform, false), Info.Create("SRDebugger Version", SRDebug.Version, false) }); _info.Add("Display", new[] { Info.Create("Resolution", () => Screen.width + "x" + Screen.height, false), Info.Create("DPI", () => Screen.dpi, false), Info.Create("Fullscreen", () => Screen.fullScreen, false), Info.Create("Orientation", () => Screen.orientation, false) }); _info.Add("Runtime", new[] { Info.Create("Play Time", () => Time.unscaledTime, false), Info.Create("Level Play Time", () => Time.timeSinceLevelLoad, false), Info.Create("Current Level", () => Application.loadedLevelName, false), Info.Create("Quality Level", () => QualitySettings.names[QualitySettings.GetQualityLevel()] + " (" + QualitySettings.GetQualityLevel() + ")", false) }); // Check for cloud build manifest var cloudBuildManifest = (TextAsset)Resources.Load("UnityCloudBuildManifest.json"); var manifestDict = cloudBuildManifest != null ? Json.Deserialize(cloudBuildManifest.text) as Dictionary <string, object> : null; if (manifestDict != null) { var manifestList = new List <ISystemInfo>(manifestDict.Count); foreach (var kvp in manifestDict) { if (kvp.Value == null) { continue; } var value = kvp.Value.ToString(); manifestList.Add(Info.Create(GetCloudManifestPrettyName(kvp.Key), value, false)); } _info.Add("Build", manifestList); } _info.Add("Features", new[] { Info.Create("Location", SystemInfo.supportsLocationService, false), Info.Create("Accelerometer", SystemInfo.supportsAccelerometer, false), Info.Create("Gyroscope", SystemInfo.supportsGyroscope, false), Info.Create("Vibration", SystemInfo.supportsVibration, false) }); #if UNITY_IOS #if ENABLE_IL2CPP const string IL2CPP = "Yes"; #else const string IL2CPP = "No"; #endif _info.Add("iOS", new[] { #if UNITY_5 Info.Create("Generation", UnityEngine.iOS.Device.generation, false), Info.Create("Ad Tracking", UnityEngine.iOS.Device.advertisingTrackingEnabled, false), #else Info.Create("Generation", iPhone.generation, false), Info.Create("Ad Tracking", iPhone.advertisingTrackingEnabled, false), #endif Info.Create("IL2CPP", IL2CPP, false), }); #endif _info.Add("Graphics", new[] { Info.Create("Device Name", SystemInfo.graphicsDeviceName, false), Info.Create("Device Vendor", SystemInfo.graphicsDeviceVendor, false), Info.Create("Device Version", SystemInfo.graphicsDeviceVersion, false), Info.Create("Max Tex Size", SystemInfo.maxTextureSize, false), #if !UNITY_5 Info.Create("Fill Rate", SystemInfo.graphicsPixelFillrate > 0 ? "{0}mpix/s".Fmt(SystemInfo.graphicsPixelFillrate) : "Unknown", false), #endif Info.Create("NPOT Support", SystemInfo.npotSupport, false), Info.Create("Render Textures", "{0} ({1})".Fmt(SystemInfo.supportsRenderTextures ? "Yes" : "No", SystemInfo.supportedRenderTargetCount), false), Info.Create("3D Textures", SystemInfo.supports3DTextures, false), Info.Create("Compute Shaders", SystemInfo.supportsComputeShaders, false), #if !UNITY_5 Info.Create("Vertex Programs", SystemInfo.supportsVertexPrograms, false), #endif Info.Create("Image Effects", SystemInfo.supportsImageEffects, false), Info.Create("Cubemaps", SystemInfo.supportsRenderToCubemap, false), Info.Create("Shadows", SystemInfo.supportsShadows, false), Info.Create("Stencil", SystemInfo.supportsStencil, false), Info.Create("Sparse Textures", SystemInfo.supportsSparseTextures, false) }); }
private void CreateDefaultSet() { _info.Add("System", new[] { InfoEntry.Create("Operating System", UnityEngine.SystemInfo.operatingSystem), InfoEntry.Create("Device Name", UnityEngine.SystemInfo.deviceName, true), InfoEntry.Create("Device Type", UnityEngine.SystemInfo.deviceType), InfoEntry.Create("Device Model", UnityEngine.SystemInfo.deviceModel), InfoEntry.Create("CPU Type", UnityEngine.SystemInfo.processorType), InfoEntry.Create("CPU Count", UnityEngine.SystemInfo.processorCount), InfoEntry.Create("System Memory", SRFileUtil.GetBytesReadable(((long)UnityEngine.SystemInfo.systemMemorySize) * 1024 * 1024)) //Info.Create("Process Name", () => Process.GetCurrentProcess().ProcessName) }); #if ENABLE_IL2CPP const string IL2CPP = "Yes"; #else const string IL2CPP = "No"; #endif _info.Add("Unity", new[] { InfoEntry.Create("Version", Application.unityVersion), InfoEntry.Create("Debug", Debug.isDebugBuild), InfoEntry.Create("Unity Pro", Application.HasProLicense()), InfoEntry.Create("System Language", Application.systemLanguage), InfoEntry.Create("Platform", Application.platform), InfoEntry.Create("IL2CPP", IL2CPP), InfoEntry.Create("SRDebugger Version", SRDebug.Version), }); _info.Add("Display", new[] { InfoEntry.Create("Resolution", () => Screen.width + "x" + Screen.height), InfoEntry.Create("DPI", () => Screen.dpi), InfoEntry.Create("Fullscreen", () => Screen.fullScreen), InfoEntry.Create("Orientation", () => Screen.orientation) }); _info.Add("Runtime", new[] { InfoEntry.Create("Play Time", () => Time.unscaledTime), InfoEntry.Create("Level Play Time", () => Time.timeSinceLevelLoad), #if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 InfoEntry.Create("Current Level", () => Application.loadedLevelName), #else InfoEntry.Create("Current Level", () => { var activeScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene(); return("{0} (Index: {1})"); }), #endif InfoEntry.Create("Quality Level", () => QualitySettings.names[QualitySettings.GetQualityLevel()] + " (" + QualitySettings.GetQualityLevel() + ")") }); // Check for cloud build manifest var cloudBuildManifest = (TextAsset)Resources.Load("UnityCloudBuildManifest.json"); var manifestDict = cloudBuildManifest != null ? Json.Deserialize(cloudBuildManifest.text) as Dictionary <string, object> : null; if (manifestDict != null) { var manifestList = new List <InfoEntry>(manifestDict.Count); foreach (var kvp in manifestDict) { if (kvp.Value == null) { continue; } var value = kvp.Value.ToString(); manifestList.Add(InfoEntry.Create(GetCloudManifestPrettyName(kvp.Key), value)); } _info.Add("Build", manifestList); } _info.Add("Features", new[] { InfoEntry.Create("Location", UnityEngine.SystemInfo.supportsLocationService), InfoEntry.Create("Accelerometer", UnityEngine.SystemInfo.supportsAccelerometer), InfoEntry.Create("Gyroscope", UnityEngine.SystemInfo.supportsGyroscope), InfoEntry.Create("Vibration", UnityEngine.SystemInfo.supportsVibration) }); #if UNITY_IOS _info.Add("iOS", new[] { #if UNITY_5 InfoEntry.Create("Generation", UnityEngine.iOS.Device.generation), InfoEntry.Create("Ad Tracking", UnityEngine.iOS.Device.advertisingTrackingEnabled), #else InfoEntry.Create("Generation", UnityEngine.iOS.Device.generation), InfoEntry.Create("Ad Tracking", UnityEngine.iOS.Device.advertisingTrackingEnabled), #endif }); #endif #pragma warning disable 618 _info.Add("Graphics", new[] { InfoEntry.Create("Device Name", UnityEngine.SystemInfo.graphicsDeviceName), InfoEntry.Create("Device Vendor", UnityEngine.SystemInfo.graphicsDeviceVendor), InfoEntry.Create("Device Version", UnityEngine.SystemInfo.graphicsDeviceVersion), InfoEntry.Create("Max Tex Size", UnityEngine.SystemInfo.maxTextureSize), #if !UNITY_5 #endif InfoEntry.Create("NPOT Support", UnityEngine.SystemInfo.npotSupport), InfoEntry.Create("3D Textures", UnityEngine.SystemInfo.supports3DTextures), InfoEntry.Create("Compute Shaders", UnityEngine.SystemInfo.supportsComputeShaders), #if !UNITY_5 InfoEntry.Create("Vertex Programs", SystemInfo.supportsVertexPrograms), #endif InfoEntry.Create("Image Effects", UnityEngine.SystemInfo.supportsImageEffects), InfoEntry.Create("Cubemaps", UnityEngine.SystemInfo.supportsRenderToCubemap), InfoEntry.Create("Shadows", UnityEngine.SystemInfo.supportsShadows), InfoEntry.Create("Stencil", UnityEngine.SystemInfo.supportsStencil), InfoEntry.Create("Sparse Textures", UnityEngine.SystemInfo.supportsSparseTextures) }); #pragma warning restore 618 }