GetApplicationSettingCompressAssetsOnImport() private method

private GetApplicationSettingCompressAssetsOnImport ( ) : bool
return bool
Example #1
0
 void ReadAssetImportPreferences()
 {
     m_AutoRefresh            = EditorPrefs.GetBool("kAutoRefresh");
     m_DirectoryMonitoring    = EditorPrefs.GetBool("DirectoryMonitoring", true);
     m_VerifySavingAssets     = EditorPrefs.GetBool("VerifySavingAssets", false);
     m_CompressAssetsOnImport = Unsupported.GetApplicationSettingCompressAssetsOnImport();
     m_EnterSafeModeDialog    = EditorPrefs.GetBool("EnterSafeModeDialog", true);
     m_DesiredImportWorkerCountPctOfLogicalCPUs = GetDesiredImportWorkerCountPctOfLogicalCPUs();
 }
        private void ReadPreferences()
        {
            this.m_ScriptEditorPath.str = EditorPrefs.GetString("kScriptsDefaultApp");
            this.m_ScriptEditorArgs     = EditorPrefs.GetString("kScriptEditorArgs", "\"$(File)\"");
            this.m_ImageAppPath.str     = EditorPrefs.GetString("kImagesDefaultApp");
            this.m_AndroidSdkPath       = EditorPrefs.GetString("AndroidSdkRoot");
            this.m_ScriptApps           = this.BuildAppPathList(this.m_ScriptEditorPath, "RecentlyUsedScriptApp");
            if (Application.platform == RuntimePlatform.WindowsEditor)
            {
                foreach (string current in SyncVS.InstalledVisualStudios.Values)
                {
                    if (Array.IndexOf <string>(this.m_ScriptApps, current) == -1)
                    {
                        if (this.m_ScriptApps.Length < 10)
                        {
                            ArrayUtility.Add <string>(ref this.m_ScriptApps, current);
                        }
                        else
                        {
                            this.m_ScriptApps[1] = current;
                        }
                    }
                }
            }
            this.m_ImageApps             = this.BuildAppPathList(this.m_ImageAppPath, "RecentlyUsedImageApp");
            this.m_ScriptAppDisplayNames = this.BuildFriendlyAppNameList(this.m_ScriptApps, "MonoDevelop (built-in)");
            this.m_ImageAppDisplayNames  = this.BuildFriendlyAppNameList(this.m_ImageApps, "Open by file extension");
            this.m_DiffTools             = InternalEditorUtility.GetAvailableDiffTools();
            if ((this.m_DiffTools == null || this.m_DiffTools.Length == 0) && InternalEditorUtility.HasPro())
            {
                this.m_noDiffToolsMessage = InternalEditorUtility.GetNoDiffToolsDetectedMessage();
            }
            string @string = EditorPrefs.GetString("kDiffsDefaultApp");

            this.m_DiffToolIndex = ArrayUtility.IndexOf <string>(this.m_DiffTools, @string);
            if (this.m_DiffToolIndex == -1)
            {
                this.m_DiffToolIndex = 0;
            }
            this.m_AutoRefresh = EditorPrefs.GetBool("kAutoRefresh");
            this.m_ReopenLastUsedProjectOnStartup = EditorPrefs.GetBool("ReopenLastUsedProjectOnStartup");
            this.m_UseOSColorPicker                   = EditorPrefs.GetBool("UseOSColorPicker");
            this.m_EnableEditorAnalytics              = EditorPrefs.GetBool("EnableEditorAnalytics", true);
            this.m_ShowAssetStoreSearchHits           = EditorPrefs.GetBool("ShowAssetStoreSearchHits", true);
            this.m_VerifySavingAssets                 = EditorPrefs.GetBool("VerifySavingAssets", false);
            this.m_GICacheSettings.m_EnableCustomPath = EditorPrefs.GetBool("GICacheEnableCustomPath");
            this.m_GICacheSettings.m_CachePath        = EditorPrefs.GetString("GICacheFolder");
            this.m_GICacheSettings.m_MaximumSize      = EditorPrefs.GetInt("GICacheMaximumSizeGB");
            this.m_GICacheSettings.m_CompressionLevel = EditorPrefs.GetInt("GICacheCompressionLevel");
            this.m_AllowAttachedDebuggingOfEditor     = EditorPrefs.GetBool("AllowAttachedDebuggingOfEditor", true);
            this.m_AllowAlphaNumericHierarchy         = EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false);
            this.m_CompressAssetsOnImport             = Unsupported.GetApplicationSettingCompressAssetsOnImport();
            foreach (IPreferenceWindowExtension current2 in this.prefWinExtensions)
            {
                current2.ReadPreferences();
            }
        }
Example #3
0
        private void ReadPreferences()
        {
            m_ScriptEditorPath.str = CodeEditor.Editor.EditorInstallation.Path;

            m_ExternalEditorSupportsUnityProj = EditorPrefs.GetBool("kExternalEditorSupportsUnityProj", false);
            m_ImageAppPath.str = EditorPrefs.GetString("kImagesDefaultApp");

            m_ScriptApps         = BuildAppPathList(m_ScriptEditorPath, kRecentScriptAppsKey, "internal");
            m_ScriptAppsEditions = new string[m_ScriptApps.Length];

            var foundScriptEditorPaths = CodeEditor.Editor.GetFoundScriptEditorPaths();

            foreach (var scriptEditorPath in foundScriptEditorPaths.Keys)
            {
                ArrayUtility.Add(ref m_ScriptApps, scriptEditorPath);
                ArrayUtility.Add(ref m_ScriptAppsEditions, null);
            }

            m_ImageApps = BuildAppPathList(m_ImageAppPath, kRecentImageAppsKey, "");

            m_ScriptAppDisplayNames = BuildFriendlyAppNameList(m_ScriptApps, m_ScriptAppsEditions, foundScriptEditorPaths,
                                                               "Open by file extension");

            m_ImageAppDisplayNames = BuildFriendlyAppNameList(m_ImageApps, null, null,
                                                              L10n.Tr("Open by file extension"));

            m_DiffTools = InternalEditorUtility.GetAvailableDiffTools();

            // only show warning if has team license
            if ((m_DiffTools == null || m_DiffTools.Length == 0) && InternalEditorUtility.HasTeamLicense())
            {
                m_noDiffToolsMessage = InternalEditorUtility.GetNoDiffToolsDetectedMessage();
            }

            string diffTool = EditorPrefs.GetString("kDiffsDefaultApp");

            m_DiffToolIndex = ArrayUtility.IndexOf(m_DiffTools, diffTool);
            if (m_DiffToolIndex == -1)
            {
                m_DiffToolIndex = 0;
            }

            m_AutoRefresh = EditorPrefs.GetBool("kAutoRefresh");

            m_ReopenLastUsedProjectOnStartup = EditorPrefs.GetBool("ReopenLastUsedProjectOnStartup");

            m_UseOSColorPicker            = EditorPrefs.GetBool("UseOSColorPicker");
            m_EnableEditorAnalytics       = EditorPrefs.GetBool("EnableEditorAnalytics", true);
            m_ShowAssetStoreSearchHits    = EditorPrefs.GetBool("ShowAssetStoreSearchHits", true);
            m_VerifySavingAssets          = EditorPrefs.GetBool("VerifySavingAssets", false);
            m_ScriptCompilationDuringPlay = (ScriptChangesDuringPlayOptions)EditorPrefs.GetInt("ScriptCompilationDuringPlay", 0);
            m_DeveloperMode = Unsupported.IsDeveloperMode();

            m_GICacheSettings.m_EnableCustomPath = EditorPrefs.GetBool("GICacheEnableCustomPath");
            m_GICacheSettings.m_CachePath        = EditorPrefs.GetString("GICacheFolder");
            m_GICacheSettings.m_MaximumSize      = EditorPrefs.GetInt("GICacheMaximumSizeGB", 10);
            m_GICacheSettings.m_CompressionLevel = EditorPrefs.GetInt("GICacheCompressionLevel");

            m_SpriteAtlasCacheSize = EditorPrefs.GetInt("SpritePackerCacheMaximumSizeGB");

            m_AllowAttachedDebuggingOfEditor = EditorPrefs.GetBool("AllowAttachedDebuggingOfEditor", true);
            m_EnableEditorLocalization       = EditorPrefs.GetBool("Editor.kEnableEditorLocalization", true);
            m_SelectedLanguage           = EditorPrefs.GetString("Editor.kEditorLocale", LocalizationDatabase.GetDefaultEditorLanguage().ToString());
            m_AllowAlphaNumericHierarchy = EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false);
            m_EnableCodeCoverage         = EditorPrefs.GetBool("CodeCoverageEnabled", false);

            m_CompressAssetsOnImport = Unsupported.GetApplicationSettingCompressAssetsOnImport();
            m_GpuDevice = EditorPrefs.GetString("GpuDeviceName");

            foreach (IPreferenceWindowExtension extension in prefWinExtensions)
            {
                extension.ReadPreferences();
            }
        }