public static void Load() { if (i != null) { return; } i = EditorPrefJson <E> .Get(Package.editorPrefName); }
/// <summary> /// /// </summary> static void DrawGUI() { EditorGUI.BeginChangeCheck(); using (new PreferenceLayoutScope(ref s_scrollPos)) { E.i.Enable = HEditorGUILayout.ToggleLeft(SS._Enable, E.i.Enable); EditorGUI.indentLevel++; GUILayout.Space(8f); using (new EditorGUI.DisabledGroupScope(!E.i.Enable)) { E.i.showExtension = HEditorGUILayout.ToggleLeft(S._ShowExtension, E.i.showExtension); using (new EditorGUI.DisabledGroupScope(!E.i.showExtension)) { EditorGUI.indentLevel++; E.i.extBackColor = EditorGUILayout.ColorField(SS._BackColor, E.i.extBackColor); E.i.extTextColor = EditorGUILayout.ColorField(SS._TextColor, E.i.extTextColor); EditorGUI.indentLevel--; } E.i.showLineColor = HEditorGUILayout.ToggleLeft(SS._Changecolorforeachrow, E.i.showLineColor); using (new EditorGUI.DisabledGroupScope(!E.i.showLineColor)) { EditorGUI.indentLevel++; E.i.lineColor = EditorGUILayout.ColorField(SS._Rowcolor, E.i.lineColor); EditorGUI.indentLevel--; } GUILayout.Space(8f); EditorGUILayout.LabelField($"* {SS._Experimental}", EditorStyles.boldLabel); E.i.IconClickContext = HEditorGUILayout.ToggleLeft(SS._ContextMenuWithIconClick, E.i.IconClickContext); if (UnitySymbol.Has("UNITY_EDITOR_WIN")) { using (new EditorGUI.DisabledGroupScope(!E.i.showExtension)) { E.i.enableExtensionRun = HEditorGUILayout.ToggleLeft(S._Clickontheextensiontorunitinthefiler, E.i.enableExtensionRun); } } else { E.i.enableExtensionRun = false; } E.i.adressableSupport = HEditorGUILayout.ToggleLeft(S._EnablingAddressablesupport, E.i.adressableSupport); } EditorGUI.indentLevel--; } GUILayout.Space(8f); if (EditorGUI.EndChangeCheck()) { E.Save(); CustomProjectBrowser.s_styles.lineColor = E.i.lineColor; EditorApplication.RepaintProjectWindow(); } GUILayout.Space(8f); }
static CustomProjectBrowser() { E.Load(); EditorApplication.projectWindowItemOnGUI += ProjectWindowItemCallback; }
public static void PreferencesGUI() { #endif E.Load(); DrawGUI(); }
void OnEnable() { drawGUI = DrawGUI; E.Load(); }