public void Load()
        {
            // Define 'BUILD_PIPELINE_WEBGL_UNITY_DEFAULT' if you want to set a build location as same as default of Unity Editor
            // But it's buggy because the native doesn't generate the new folder to put a build.
#if BUILD_PIPELINE_WEBGL_UNITY_DEFAULT
            buildPath = PlayerPrefs.GetString(PREFS_SETTINGS_BUILD_PATH, EditorUserBuildSettings.GetBuildLocation(BuildTarget.WebGL));
#else
            buildPath = PlayerPrefs.GetString(PREFS_SETTINGS_BUILD_PATH, string.Empty);
#endif
            nameFormat         = PlayerPrefs.GetString(PREFS_SETTINGS_NAME_FORMAT, "{package}_{date}");
            dateTimeFormat     = PlayerPrefs.GetString(PREFS_SETTINGS_DATE_TIME_FORMAT, "yyyyMMddHHmmss");
            stripMobileWarning = PlayerPrefs.GetString(PREFS_SETTINGS_STRIP_MOBILE_WARNING, bool.FalseString) == bool.TrueString;
            createNewFolder    = PlayerPrefs.GetString(PREFS_SETTINGS_CREATE_NEW_FOLDER, bool.TrueString) == bool.TrueString;
            linkerTarget       = (WebGLLinkerTarget)PlayerPrefs.GetInt(PREFS_SETTINGS_LINKER_TARGET, (int)PlayerSettings.WebGL.linkerTarget);
            memorySize         = PlayerPrefs.GetInt(PREFS_SETTINGS_MEMORY_SIZE, PlayerSettings.WebGL.memorySize);
            compressionFormat  = (WebGLCompressionFormat)PlayerPrefs.GetInt(PREFS_SETTINGS_COMPRESSION_FORMAT, (int)PlayerSettings.WebGL.compressionFormat);
            wasmStreaming      = PlayerPrefs.GetString(PREFS_SETTINGS_WASM_STREAMING, PlayerSettings.WebGL.wasmStreaming ? bool.TrueString : bool.FalseString) == bool.TrueString;
            buildOptions       = (BuildOptions)PlayerPrefs.GetInt(PREFS_SETTINGS_BUILD_OPTIONS, 0);
        }
Beispiel #2
0
        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
        }