@@ -244,8 +244,6 @@ There are utility methods for coding source generator more efficient and readabl
244244
245245
246246``` csharp
247- using static SatorImaging .UnitySourceGenerator .USGFullNameOf ; // usg<T>() to work
248-
249247// indent utility
250248sb .IndentChar (' ' ); // default
251249sb .IndentSize (4 ); // default
@@ -259,20 +257,24 @@ sb.IndentBegin("void MethodName() {");
259257 sb .IndentLine ($" MyObject.EnumValue = {CAST_MY_ENUM }intValue" );
260258}
261259sb .IndentEnd (" }" );
260+ ```
261+
262+ ``` csharp
263+ using static SatorImaging .UnitySourceGenerator .USGFullNameOf ; // usg<T>() to work
262264
263- // writing with auto completion
265+ // usg<T>() allows to write refactoring-ready code with auto completion
264266sb .Append ($" public static {usg <Dictionary <int , float >>()} MyDict = new() {{ init... }};" );
265267
266- // usg<T>{params string[]) to get full type name
267- usg <MyClass >(" NestedStruct.MyField" ); // -> global::Full.Namespace.To.MyClass.MyStruct.MyField
268+ // usg<T>{params string[]) to generate full name with specified member name.
269+ usg <MyClass >(" NestedStruct.MyField" ); // -> global::Full.Namespace.To.MyClass.MyStruct.MyField
268270// most strict refactoring-ready code
269271usg <MyClass >(nameof (MyClass .NestedStruct ), nameof (MyClass .NestedStruct .MyField ));
270272
271- // usg(object) to retrieve full type definition literal
272- static class ExistingClass {
273+ // usg(object valueOrType, bool isFullName ) to retrieve full type definition literal
274+ static class MyClass {
273275 Dictionary <int , List <Dictionary <string , float [][]>[]>> Complex = new (0 ); // usg() throws when null
274276 }
275- sb . Append ( $" ExistingClass.Complex = new { usg (ExistingClass .Complex )}() {{ generated code ... }}; " );
277+ usg (MyClass .Complex ); // -> global:: ...Dictionary<int, global::...List<global::...Dictionary<string, float[][]>[]>>
276278```
277279
278280
@@ -294,7 +296,7 @@ There are utility functions to perform source code generation on build event.
294296USGUtility .ForceGenerateByName (nameof (MinimalGenerator ));
295297
296298// perform code generation by known path.
297- USGEngine .ProcessFile (assetPath , true ); // force overwrite
299+ USGEngine .ProcessFile (assetPath , true , true ); // force overwrite all related generators
298300```
299301
300302
@@ -366,16 +368,9 @@ Use the following git URL in Unity Package Manager (UPM).
366368
367369## USG Control Panel & Window
368370
369- - ` Edit > Project Settings > Alternative Source Generator `
370-
371- ![ ] ( https://dl.dropbox.com/scl/fi/jijclnarrruxdt590vss1/USG_Panel.png?rlkey=k44lc9swk0mmui849ck7tappk&dl=0 )
372-
373-
374- - ` Tools > Alternative Source Generator `
375-
376- ![ ] ( https://dl.dropbox.com/scl/fi/dedb30699adhss8zqwft5/USG_Window.png?rlkey=13gq24ypciw00o9tkhicdpxpe&dl=0 )
377-
371+ - ` Main Menu > Edit > Project Settings > Alternative Source Generator `
378372
373+ ![ ] ( https://dl.dropbox.com/scl/fi/jijclnarrruxdt590vss1/USG_Panel.png?rlkey=k44lc9swk0mmui849ck7tappk&dl=0 )
379374
380375
381376- ** On**
@@ -391,6 +386,12 @@ Use the following git URL in Unity Package Manager (UPM).
391386- 🗑️
392387 - Delete * emitted* file from ` USG.g ` folder.
393388
389+ - ` Main Menu > Tools > Alternative Source Generator `
390+ - open as a window.
391+
392+ ![ ] ( https://dl.dropbox.com/scl/fi/dedb30699adhss8zqwft5/USG_Window.png?rlkey=13gq24ypciw00o9tkhicdpxpe&dl=0 )
393+
394+
394395
395396## Context Menu
396397
0 commit comments