@@ -91,10 +91,11 @@ void OnGUI()
91
91
static string [ ] _emitterPaths = Array . Empty < string > ( ) ;
92
92
static string _generatorPathToShowEmitters = null ;
93
93
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 ;
95
96
static GUIContent gui_deleteBtn ;
96
- static GUIContent gui_generateBtn ;
97
- static GUIContent gui_goGeneratedBtn ;
97
+ static GUIContent gui_runBtn ;
98
+ static GUIContent gui_unveilBtn ;
98
99
static GUILayoutOption gui_toggleWidth ;
99
100
static GUILayoutOption gui_buttonWidth ;
100
101
static GUIStyle gui_noBGButtonStyle ;
@@ -104,11 +105,10 @@ void OnGUI()
104
105
// to take reference to newly created object, need `ref` chain.
105
106
static void Wakeup ( ref Editor cachedEditor )
106
107
{
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" ) ) ;
109
109
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/
112
112
gui_toggleWidth ??= GUILayout . Width ( 16 ) ;
113
113
gui_buttonWidth ??= GUILayout . Width ( 32 ) ;
114
114
if ( gui_noBGButtonStyle == null )
@@ -227,7 +227,7 @@ static void DrawGenerator(string filePath, bool showEmitterBtn)
227
227
}
228
228
229
229
//run
230
- if ( GUILayout . Button ( gui_generateBtn , gui_buttonWidth ) )
230
+ if ( GUILayout . Button ( gui_runBtn , gui_buttonWidth ) )
231
231
{
232
232
Debug . Log ( $ "[{ nameof ( UnitySourceGenerator ) } ] Generator running: { fileName } ") ;
233
233
USGUtility . ForceGenerateByName ( fileName , false ) ;
@@ -238,18 +238,19 @@ static void DrawGenerator(string filePath, bool showEmitterBtn)
238
238
{
239
239
EditorGUIUtility . PingObject ( AssetDatabase . LoadAssetAtPath < Object > ( filePath ) ) ;
240
240
}
241
- //emitter??
241
+
242
+ //emitters??
242
243
if ( showEmitterBtn )
243
244
{
244
- if ( GUILayout . Button ( gui_emitterBtn , gui_noBGButtonStyle ) )
245
+ if ( GUILayout . Button ( gui_emittersBtn , gui_noBGButtonStyle ) )
245
246
{
246
247
_emitterPaths = GetEmitters ( filePath ) ;
247
248
}
248
249
}
249
- //goGenerated ??
250
+ //unveil ??
250
251
else
251
252
{
252
- if ( GUILayout . Button ( gui_goGeneratedBtn , gui_noBGButtonStyle ) )
253
+ if ( GUILayout . Button ( gui_unveilBtn , gui_noBGButtonStyle ) )
253
254
{
254
255
EditorGUIUtility . PingObject ( AssetDatabase . LoadAssetAtPath < Object > (
255
256
USGEngine . GetGeneratorOutputPath ( filePath , _generatorNameToOutputFileName [ fileName ] ) ) ) ;
0 commit comments