private void OnFocus() { WebGLMemorySize = PlayerSettings.WebGL.memorySize; WebGLExceptionSupport = PlayerSettings.WebGL.exceptionSupport; WebGLCompressionFormat = PlayerSettings.WebGL.compressionFormat; WebGLDataCaching = PlayerSettings.WebGL.dataCaching; WebGLDebugSymbols = PlayerSettings.WebGL.debugSymbols; }
private void OnEnable() { BuildSettings.Load(); WebGLMemorySize = PlayerSettings.WebGL.memorySize; WebGLExceptionSupport = PlayerSettings.WebGL.exceptionSupport; WebGLCompressionFormat = PlayerSettings.WebGL.compressionFormat; WebGLDataCaching = PlayerSettings.WebGL.dataCaching; WebGLDebugSymbols = PlayerSettings.WebGL.debugSymbols; for (int j = 0; j < SectionAnimators.Length; j++) { SectionAnimators [j] = new AnimBool(selectedSection == j, new UnityAction(base.Repaint)); } }
protected override void Reset() { base.Reset(); #if UNITY_5_5_OR_NEWER m_MemorySize = PlayerSettings.WebGL.memorySize; m_DataCaching = PlayerSettings.WebGL.dataCaching; m_Template = PlayerSettings.WebGL.template; m_CompressionFormat = PlayerSettings.WebGL.compressionFormat; m_ExceptionSupport = PlayerSettings.WebGL.exceptionSupport; m_DebugSymbols = PlayerSettings.WebGL.debugSymbols; #else m_MemorySize = PlayerSettings.GetPropertyInt("memorySize", BuildTargetGroup.WebGL); m_DataCaching = PlayerSettings.GetPropertyBool("dataCaching", BuildTargetGroup.WebGL); m_Template = PlayerSettings.GetPropertyString("template", BuildTargetGroup.WebGL); m_ExceptionSupport = (WebGLExceptionSupport)PlayerSettings.GetPropertyInt("exceptionSupport", BuildTargetGroup.WebGL); #endif }
public ScopeBuildSettings() { saveTarget = EditorUserBuildSettings.activeBuildTarget; #if LOCAL_UNITY_2018_1_OR_NEWER buildTargetGroup = UnityEditorUserBuildSettings.activeBuildTargetGroup; #endif scriptingImplementation = B.scriptingBackend; il2CppCompilerConfiguration = B.il2CppCompilerConfiguration; compressionType = B.compressionType; development = B.development; buildAppBundle = B.buildAppBundle; targetArchitectures = B.targetArchitectures; androidBuildType = B.androidBuildType; WebGL_compressionFormat = B.WebGL_compressionFormat; WebGL_linkerTarget = B.WebGL_linkerTarget; WebGL_memorySize = B.WebGL_memorySize; WebGL_exceptionSupport = B.WebGL_exceptionSupport; #if UNITY_2019_1_OR_NEWER WebGL_threadsSupport = B.WebGL_threadsSupport; WebGL_wasmStreaming = B.WebGL_wasmStreaming; #endif }
void PublishSectionGUI() { if (BeginSettingsBox(6, new GUIContent("Publishing Settings"))) { GUILayout.Label("WebGL", EditorStyles.boldLabel, new GUILayoutOption[0]); GUI.changed = false; WebGLMemorySize = EditorGUILayout.IntField("WebGL Memory Size*", WebGLMemorySize); if (GUI.changed) { WebGLMemorySize = Mathf.Clamp(WebGLMemorySize, 0x10, 0x7ff); PlayerSettings.WebGL.memorySize = WebGLMemorySize; } GUI.changed = false; WebGLExceptionSupport = (WebGLExceptionSupport)EditorGUILayout.EnumPopup("Enable Exceptions*", PlayerSettings.WebGL.exceptionSupport); if (WebGLExceptionSupport == WebGLExceptionSupport.FullWithStacktrace) { EditorGUILayout.HelpBox("'Full With Stacktrace' exception will decrease performance and increase browser memory usage. Only use this for debugging purposes, and make sure to test in a 64-bit browser.", MessageType.Warning); } if (GUI.changed) { PlayerSettings.WebGL.exceptionSupport = WebGLExceptionSupport; } GUI.changed = false; WebGLCompressionFormat = (WebGLCompressionFormat)EditorGUILayout.EnumPopup("Compression Format*", PlayerSettings.WebGL.compressionFormat); if (GUI.changed) { PlayerSettings.WebGL.compressionFormat = WebGLCompressionFormat; } GUI.changed = false; WebGLDataCaching = EditorGUILayout.Toggle("Data caching*", WebGLDataCaching); if (GUI.changed) { PlayerSettings.WebGL.dataCaching = WebGLDataCaching; } GUI.changed = false; WebGLDebugSymbols = EditorGUILayout.Toggle("Debug Symbols*", WebGLDebugSymbols); if (GUI.changed) { PlayerSettings.WebGL.debugSymbols = WebGLDebugSymbols; } EditorGUILayout.Space(); GUILayout.Label("Permissions", EditorStyles.boldLabel, new GUILayoutOption[0]); scrollPos = EditorGUILayout.BeginScrollView(scrollPos, EditorStyles.helpBox, GUILayout.MinHeight(110f)); if (BuildSettings.Get.permissions.Length != (int)Permissions.Count) { System.Array.Resize(ref BuildSettings.Get.permissions, (int)Permissions.Count); } for (int i = 0; i < BuildSettings.Get.permissions.Length; i++) { BuildSettings.Get.permissions[i] = EditorGUILayout.ToggleLeft(((Permissions)i).Name(), BuildSettings.Get.permissions[i]); } EditorGUILayout.EndScrollView(); EditorGUILayout.Space(); GUILayout.Label("Extra Permissions", EditorStyles.boldLabel, new GUILayoutOption[0]); GUILayout.Label("(one per line)"); BuildSettings.Get.permissionsExtra = EditorGUILayout.TextArea(BuildSettings.Get.permissionsExtra, GUILayout.MinHeight(50)); EditorGUILayout.Space(); GUILayout.Label("Packing", EditorStyles.boldLabel, new GUILayoutOption[0]); BuildSettings.Get.packExtension = EditorGUILayout.BeginToggleGroup("Pack Extension", BuildSettings.Get.packExtension); BuildSettings.Get.updateExtension = EditorGUILayout.BeginToggleGroup("Update", BuildSettings.Get.updateExtension); GUI.enabled = BuildSettings.Get.updateExtension; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(".pem file : " + Path.GetFileName(BuildSettings.Get.pemFile)); if (GUILayout.Button("Browse...")) { string ret = EditorUtility.OpenFilePanel("Select you .pem file", EditorUserBuildSettings.GetBuildLocation(BuildTarget.WebGL), "pem"); if (!string.IsNullOrEmpty(ret) && File.Exists(ret)) { BuildSettings.Get.pemFile = ret; } if (!File.Exists(BuildSettings.Get.pemFile)) { BuildSettings.Get.pemFile = ""; } } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndToggleGroup(); EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Pack Extension...")) { string path = EditorUtility.OpenFolderPanel("Select App Folder", EditorUserBuildSettings.GetBuildLocation(BuildTarget.WebGL), ""); if (Directory.Exists(path)) { ProgressHelper progress = new ProgressHelper(); progress.Reset(1); progress.Step("Building Player - Chrome App", "Packing Extension into .crx file"); if (BuildSettings.Get.packExtension) { if (ChromeHelper.PackExtension(path)) { EditorUtility.RevealInFinder(path); } } progress.Done(); } } GUILayout.Space(10); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndToggleGroup(); ShowSharedNote(); } EndSettingsBox(); }