private void ShowGeneral(string searchContext) { // Options bool collabEnabled = Collab.instance.IsCollabEnabledForCurrentProject(); using (new EditorGUI.DisabledScope(collabEnabled)) { if (collabEnabled) { EditorGUILayout.Toggle(GeneralProperties.autoRefresh, true); // Don't keep toggle value in m_AutoRefresh since we don't want to save the overwritten value EditorGUILayout.HelpBox(GeneralProperties.autoRefreshHelpBox); } else { m_AutoRefresh = EditorGUILayout.Toggle(GeneralProperties.autoRefresh, m_AutoRefresh); } } m_ReopenLastUsedProjectOnStartup = EditorGUILayout.Toggle(GeneralProperties.loadPreviousProjectOnStartup, m_ReopenLastUsedProjectOnStartup); bool oldCompressOnImport = m_CompressAssetsOnImport; m_CompressAssetsOnImport = EditorGUILayout.Toggle(GeneralProperties.compressAssetsOnImport, oldCompressOnImport); if (GUI.changed && m_CompressAssetsOnImport != oldCompressOnImport) { Unsupported.SetApplicationSettingCompressAssetsOnImport(m_CompressAssetsOnImport); } if (Application.platform == RuntimePlatform.OSXEditor) { m_UseOSColorPicker = EditorGUILayout.Toggle(GeneralProperties.osxColorPicker, m_UseOSColorPicker); } bool pro = UnityEngine.Application.HasProLicense(); using (new EditorGUI.DisabledScope(!pro)) { m_EnableEditorAnalytics = !EditorGUILayout.Toggle(GeneralProperties.disableEditorAnalytics, !m_EnableEditorAnalytics) || !pro && !m_EnableEditorAnalytics; } bool assetStoreSearchChanged = false; EditorGUI.BeginChangeCheck(); m_ShowAssetStoreSearchHits = EditorGUILayout.Toggle(GeneralProperties.showAssetStoreSearchHits, m_ShowAssetStoreSearchHits); if (EditorGUI.EndChangeCheck()) { assetStoreSearchChanged = true; } m_VerifySavingAssets = EditorGUILayout.Toggle(GeneralProperties.verifySavingAssets, m_VerifySavingAssets); m_ScriptCompilationDuringPlay = (ScriptChangesDuringPlayOptions)EditorGUILayout.EnumPopup(GeneralProperties.scriptChangesDuringPlay, m_ScriptCompilationDuringPlay); // Only show this toggle if this is a source build or we're already in developer mode. // We don't want to show this to users yet. if (Unsupported.IsSourceBuild() || m_DeveloperMode) { EditorGUI.BeginChangeCheck(); m_DeveloperMode = EditorGUILayout.Toggle("Developer Mode", m_DeveloperMode); if (EditorGUI.EndChangeCheck()) { m_DeveloperModeDirty = true; } } using (new EditorGUI.DisabledScope(!pro)) { int newSkin = EditorGUILayout.Popup(GeneralProperties.editorSkin, !EditorGUIUtility.isProSkin ? 0 : 1, GeneralProperties.editorSkinOptions); if ((!EditorGUIUtility.isProSkin ? 0 : 1) != newSkin) { InternalEditorUtility.SwitchSkinAndRepaintAllViews(); } } bool oldAlphaNumeric = m_AllowAlphaNumericHierarchy; m_AllowAlphaNumericHierarchy = EditorGUILayout.Toggle(GeneralProperties.enableAlphaNumericSorting, m_AllowAlphaNumericHierarchy); if (InternalEditorUtility.IsGpuDeviceSelectionSupported()) { // Cache gpu devices if (m_CachedGpuDevices == null) { var devices = InternalEditorUtility.GetGpuDevices(); m_CachedGpuDevices = new string[devices.Length + 1]; m_CachedGpuDevices[0] = "Automatic"; Array.Copy(devices, 0, m_CachedGpuDevices, 1, devices.Length); } // Try to find selected gpu device var currentGpuDeviceIndex = Array.FindIndex(m_CachedGpuDevices, gpuDevice => m_GpuDevice == gpuDevice); if (currentGpuDeviceIndex == -1) { currentGpuDeviceIndex = 0; } var newGpuDeviceIndex = EditorGUILayout.Popup("Device To Use", currentGpuDeviceIndex, m_CachedGpuDevices); if (currentGpuDeviceIndex != newGpuDeviceIndex) { m_GpuDevice = m_CachedGpuDevices[newGpuDeviceIndex]; InternalEditorUtility.SetGpuDeviceAndRecreateGraphics(newGpuDeviceIndex - 1, m_GpuDevice); } } m_EnableCodeCoverage = EditorGUILayout.Toggle(GeneralProperties.codeCoverageEnabled, m_EnableCodeCoverage); if (m_EnableCodeCoverage != Coverage.enabled) { EditorGUILayout.HelpBox((m_EnableCodeCoverage ? "Enabling " : "Disabling ") + "Code Coverage will not take effect until Unity is restarted.", MessageType.Warning); } ApplyChangesToPrefs(); if (oldAlphaNumeric != m_AllowAlphaNumericHierarchy) { EditorApplication.DirtyHierarchyWindowSorting(); } if (assetStoreSearchChanged) { ProjectBrowser.ShowAssetStoreHitsWhileSearchingLocalAssetsChanged(); } }