@@ -91,10 +91,11 @@ void OnGUI()
9191 static string [ ] _emitterPaths = Array . Empty < string > ( ) ;
9292 static string _generatorPathToShowEmitters = null ;
9393 static Dictionary < string , string > _generatorNameToOutputFileName = new ( ) ;
94- static GUIContent gui_emitterBtn ;
94+ // GUI classes cannot be initialized on field definition.
95+ static GUIContent gui_emittersBtn ;
9596 static GUIContent gui_deleteBtn ;
96- static GUIContent gui_generateBtn ;
97- static GUIContent gui_goGeneratedBtn ;
97+ static GUIContent gui_runBtn ;
98+ static GUIContent gui_unveilBtn ;
9899 static GUILayoutOption gui_toggleWidth ;
99100 static GUILayoutOption gui_buttonWidth ;
100101 static GUIStyle gui_noBGButtonStyle ;
@@ -104,11 +105,10 @@ void OnGUI()
104105 // to take reference to newly created object, need `ref` chain.
105106 static void Wakeup ( ref Editor cachedEditor )
106107 {
107- // GUI classes cannot be initialized on field definition.
108- gui_emitterBtn ??= new ( EditorGUIUtility . IconContent ( "d_icon dropdown" ) ) ;
108+ gui_emittersBtn ??= new ( EditorGUIUtility . IconContent ( "d_icon dropdown" ) ) ;
109109 gui_deleteBtn ??= new ( EditorGUIUtility . IconContent ( "d_TreeEditor.Trash" ) ) ;
110- gui_generateBtn ??= new ( EditorGUIUtility . IconContent ( "PlayButton On" ) ) ; //d_playLoopOff
111- gui_goGeneratedBtn ??= new ( EditorGUIUtility . IconContent ( "d_Linked" ) ) ; //SavePassive/SaveActive/SaveFromPlay/d_pick/
110+ gui_runBtn ??= new ( EditorGUIUtility . IconContent ( "PlayButton On" ) ) ; //d_playLoopOff
111+ gui_unveilBtn ??= new ( EditorGUIUtility . IconContent ( "d_Linked" ) ) ; //SavePassive/SaveActive/SaveFromPlay/d_pick/
112112 gui_toggleWidth ??= GUILayout . Width ( 16 ) ;
113113 gui_buttonWidth ??= GUILayout . Width ( 32 ) ;
114114 if ( gui_noBGButtonStyle == null )
@@ -227,7 +227,7 @@ static void DrawGenerator(string filePath, bool showEmitterBtn)
227227 }
228228
229229 //run
230- if ( GUILayout . Button ( gui_generateBtn , gui_buttonWidth ) )
230+ if ( GUILayout . Button ( gui_runBtn , gui_buttonWidth ) )
231231 {
232232 Debug . Log ( $ "[{ nameof ( UnitySourceGenerator ) } ] Generator running: { fileName } ") ;
233233 USGUtility . ForceGenerateByName ( fileName , false ) ;
@@ -238,18 +238,19 @@ static void DrawGenerator(string filePath, bool showEmitterBtn)
238238 {
239239 EditorGUIUtility . PingObject ( AssetDatabase . LoadAssetAtPath < Object > ( filePath ) ) ;
240240 }
241- //emitter??
241+
242+ //emitters??
242243 if ( showEmitterBtn )
243244 {
244- if ( GUILayout . Button ( gui_emitterBtn , gui_noBGButtonStyle ) )
245+ if ( GUILayout . Button ( gui_emittersBtn , gui_noBGButtonStyle ) )
245246 {
246247 _emitterPaths = GetEmitters ( filePath ) ;
247248 }
248249 }
249- //goGenerated ??
250+ //unveil ??
250251 else
251252 {
252- if ( GUILayout . Button ( gui_goGeneratedBtn , gui_noBGButtonStyle ) )
253+ if ( GUILayout . Button ( gui_unveilBtn , gui_noBGButtonStyle ) )
253254 {
254255 EditorGUIUtility . PingObject ( AssetDatabase . LoadAssetAtPath < Object > (
255256 USGEngine . GetGeneratorOutputPath ( filePath , _generatorNameToOutputFileName [ fileName ] ) ) ) ;
0 commit comments