File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ using UnityEditor;
13
13
//[UnitySourceGenerator(typeof(#SCRIPTNAME#), OverwriteIfFileExists = false)]
14
14
public partial class #SCRIPTNAME#
15
15
{
16
- #if UNITY_EDITOR // USG: Generator methods should not be included in build
16
+ #if UNITY_EDITOR // USG: class definition is required to avoid build error but methods are not.
17
17
#pragma warning disable IDE0051
18
18
19
19
readonly static string MEMBER_ACCESS = "internal";
@@ -23,7 +23,7 @@ using UnityEditor;
23
23
static bool Emit(USGContext context, StringBuilder sb)
24
24
{
25
25
// USG: static classes are IsAbstract is set.
26
- if (!context.TargetClass.IsClass || context.TargetClass.IsAbstract )
26
+ if (!context.TargetClass.IsClass)
27
27
return false; // return false to tell USG doesn't write file.
28
28
29
29
// USG: you can modify output path. default file name is that USG generated.
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ using UnityEditor;
13
13
[UnitySourceGenerator(OverwriteIfFileExists = false)]
14
14
partial class #SCRIPTNAME#
15
15
{
16
- #if UNITY_EDITOR // USG: Generator methods should not be included in build
16
+ #if UNITY_EDITOR // USG: class definition is required to avoid build error but methods are not.
17
17
#pragma warning disable IDE0051
18
18
19
19
readonly static string MEMBER_ACCESS = "internal";
@@ -23,7 +23,7 @@ using UnityEditor;
23
23
static bool Emit(USGContext context, StringBuilder sb)
24
24
{
25
25
// USG: static classes are IsAbstract is set.
26
- if (!context.TargetClass.IsClass || context.TargetClass.IsAbstract )
26
+ if (!context.TargetClass.IsClass)
27
27
return false; // return false to tell USG doesn't write file.
28
28
29
29
// USG: you can modify output path. default file name is that USG generated.
You can’t perform that action at this time.
0 commit comments