File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 1- using System . Threading . Tasks ;
2- using UnityEditor ;
3- using UnityEditor . Experimental ;
1+ using UnityEditor ;
42using UnityEngine ;
53using UnityHierarchyFolders . Runtime ;
64
7- namespace UnityHierarchyFolders . Editor
8- {
5+ namespace UnityHierarchyFolders . Editor {
96 [ CustomEditor ( typeof ( Folder ) ) ]
107 public class FolderEditor : UnityEditor . Editor
118 {
12- public override bool RequiresConstantRepaint ( )
13- {
14- return true ;
15- }
9+ private bool _expanded = false ;
1610
11+ public override bool RequiresConstantRepaint ( ) => true ;
1712 public override void OnInspectorGUI ( )
1813 {
19- DoIconColorPicker ( ) ;
14+ _expanded = EditorGUILayout . Foldout ( _expanded , "Icon Color" ) ;
15+ if ( _expanded ) { RenderColorPicker ( ) ; }
2016 }
2117
22- private void DoIconColorPicker ( )
18+ private void RenderColorPicker ( )
2319 {
24- GUILayout . Label ( "Icon Color" , EditorStyles . boldLabel ) ;
25-
2620 SerializedProperty colorIndexProperty = serializedObject . FindProperty ( "_colorIndex" ) ;
2721
2822 EditorGUILayout . BeginHorizontal ( ) ;
You can’t perform that action at this time.
0 commit comments