private void WritePreferences() { ScriptEditorUtility.SetExternalScriptEditor(m_ScriptEditorPath); ScriptEditorUtility.SetExternalScriptEditorArgs(m_ScriptEditorArgs); EditorPrefs.SetBool("kExternalEditorSupportsUnityProj", m_ExternalEditorSupportsUnityProj); EditorPrefs.SetString("kImagesDefaultApp", m_ImageAppPath); EditorPrefs.SetString("kDiffsDefaultApp", m_DiffTools.Length == 0 ? "" : m_DiffTools[m_DiffToolIndex]); WriteRecentAppsList(m_ScriptApps, m_ScriptEditorPath, kRecentScriptAppsKey); WriteRecentAppsList(m_ImageApps, m_ImageAppPath, kRecentImageAppsKey); EditorPrefs.SetBool("kAutoRefresh", m_AutoRefresh); if (Unsupported.IsDeveloperMode() || UnityConnect.preferencesEnabled) { UnityConnectPrefs.StorePanelPrefs(); } EditorPrefs.SetBool("ReopenLastUsedProjectOnStartup", m_ReopenLastUsedProjectOnStartup); EditorPrefs.SetBool("UseOSColorPicker", m_UseOSColorPicker); EditorPrefs.SetBool("EnableEditorAnalytics", m_EnableEditorAnalytics); EditorPrefs.SetBool("ShowAssetStoreSearchHits", m_ShowAssetStoreSearchHits); EditorPrefs.SetBool("VerifySavingAssets", m_VerifySavingAssets); EditorPrefs.SetInt("ScriptCompilationDuringPlay", (int)m_ScriptCompilationDuringPlay); // The Preferences window always writes all preferences, we don't want this behavior since we // want the default value to just match "IsSourceBuild" until the developer has explicitly changed it. if (m_DeveloperModeDirty) { EditorPrefs.SetBool("DeveloperMode", m_DeveloperMode); // Repaint all views to show/hide debug repaint indicator InternalEditorUtility.RepaintAllViews(); } EditorPrefs.SetBool("AllowAttachedDebuggingOfEditor", m_AllowAttachedDebuggingOfEditor); EditorPrefs.SetBool("Editor.kEnableEditorLocalization", m_EnableEditorLocalization); EditorPrefs.SetString("Editor.kEditorLocale", m_SelectedLanguage); EditorPrefs.SetBool("AllowAlphaNumericHierarchy", m_AllowAlphaNumericHierarchy); EditorPrefs.SetString("GpuDeviceName", m_GpuDevice); EditorPrefs.SetBool("GICacheEnableCustomPath", m_GICacheSettings.m_EnableCustomPath); EditorPrefs.SetInt("GICacheMaximumSizeGB", m_GICacheSettings.m_MaximumSize); EditorPrefs.SetString("GICacheFolder", m_GICacheSettings.m_CachePath); EditorPrefs.SetInt("GICacheCompressionLevel", m_GICacheSettings.m_CompressionLevel); EditorPrefs.SetInt("SpritePackerCacheMaximumSizeGB", m_SpriteAtlasCacheSize); foreach (IPreferenceWindowExtension extension in prefWinExtensions) { extension.WritePreferences(); } UnityEditor.Lightmapping.UpdateCachePath(); }
private void OnScriptEditorArgsChanged() { ScriptEditorUtility.SetExternalScriptEditorArgs(m_ScriptEditorArgs); }