Skip to content

Commit b9cad58

Browse files
committed
Update README
1 parent 36b9363 commit b9cad58

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ It is possible to automate code generation by checking Tools/UnityCodeGen/Auto-g
9898

9999
When Auto-generate on Compile is on, it will be automatically generated at the end of compilation and will be recompiled only if there is any change in the generated code.
100100

101+
## Unity Code Gen Utility
102+
By using the UnityCodeGenUtility class, it is also possible to operate from your script.
103+
104+
``` cs
105+
// get default output folder path
106+
var path = UnityCodeGenUtility.defaultFolderPath;
107+
108+
// run generation
109+
UnityCodeGenUtility.Generate();
110+
```
111+
101112
## Advanced
102113

103114
### Perform processing on classes with specific attributes added

README_JP.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ Tools/UnityCodeGen/Auto-generate on Compileにチェックを入れることで
9898

9999
Auto-generate on CompileがOnの場合、コンパイル終了時にGenerateを自動で実行し、生成コードになんらかの変更があった場合のみ再コンパイルを行います。
100100

101+
## UnityCodeGenUtility
102+
UnityCodeGenUtilityクラスを利用することで、スクリプトから操作することも可能です。
103+
104+
```cs
105+
// デフォルトの出力フォルダのパスを取得
106+
var path = UnityCodeGenUtility.defaultFolderPath;
107+
108+
// 生成を実行
109+
UnityCodeGenUtility.Generate();
110+
```
111+
101112
## 応用
102113

103114
### 特定の属性が付加されたクラスに対して処理を行う

0 commit comments

Comments
 (0)