Skip to content

Commit 73df7a0

Browse files
committed
Updated defines to be easily assigned + set to false by default
1 parent cb76398 commit 73df7a0

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

Editor/CopyPaste.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System.Collections.Generic;
2-
#if NOM_PROJECT_COPY_PASTE
1+
#if NOM_PROJECT_COPY_PASTE
2+
using System.Collections.Generic;
33
using System.IO;
44
using System.Linq;
55
using UnityEditor;

Editor/PreferenceWindow.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,20 @@ public static void OnSerialize(Settings settings) {
3333
}
3434

3535
public static void OnGUI(string searchContext, Settings obj) {
36+
GUI.enabled = !EditorApplication.isCompiling;
37+
38+
if (!GUI.enabled) {
39+
EditorGUILayout.HelpBox("The Editor is currently recompiling...", MessageType.Info);
40+
}
41+
3642
EditorGUI.indentLevel++;
43+
EditorGUI.BeginChangeCheck();
3744
EditorGUILayout.HelpBox("Shows context options for copying and pasting assets in \"IO/*\".", MessageType.Info);
3845
obj.UseCopyPaste = EditorGUILayout.ToggleLeft(_useCopyPasteText, obj.UseCopyPaste);
3946
EditorGUILayout.HelpBox("Shows context options for creating additional text file types in \"Assets/Create/Text Files/*\".", MessageType.Info);
4047
obj.UseAdditionalFiles = EditorGUILayout.ToggleLeft(_useAdditionalFilesText, obj.UseAdditionalFiles);
41-
EditorGUI.indentLevel--;
42-
43-
if (GUILayout.Button("Apply")) {
48+
49+
if (EditorGUI.EndChangeCheck()) {
4450
OnSerialize(obj);
4551

4652
// update preprocessors
@@ -66,6 +72,7 @@ public static void OnGUI(string searchContext, Settings obj) {
6672
PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, string.Join(";", allDefines));
6773
AssetDatabase.Refresh();
6874
}
75+
EditorGUI.indentLevel--;
6976
}
7077

7178
internal sealed class Settings {

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ This aims to improve the usability of the project window.
99

1010
### Package Settings
1111
- Parts of this package can be enabled/disabled via the preferences menu, located in `Edit/Preferences/Project Window Extensions`
12-
- Everything is disabled by default.
1312

1413
## Current Enhancements
1514

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.nomnom.project-window-extensions",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"displayName": "Project Window Extensions",
55
"description": "This aims to improve the usability of the project window.",
66
"unity": "2020.3",

0 commit comments

Comments
 (0)