Skip to content

Commit 75c65f9

Browse files
committed
fix: managing flag
1 parent d5a621d commit 75c65f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Editor/USGUtility.cs

+3
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ public static void ForceGenerateByName(string clsName, bool showInProjectPanel =
3434
if (path == null) return;
3535

3636

37+
var restoreOverwriteSetting = USGEngine.IgnoreOverwriteSettingByAttribute;
3738
USGEngine.IgnoreOverwriteSettingByAttribute = true; // always disabled after import event.
3839

3940
// NOTE: Invoking unity editor event while building app causes fatal error.
4041
// just generate code and not need to import it.
4142
if (BuildPipeline.isBuildingPlayer)
4243
{
4344
USGEngine.ProcessFile(path);
45+
// because of Editor event doesn't happens.
46+
USGEngine.IgnoreOverwriteSettingByAttribute = restoreOverwriteSetting;
4447
return;
4548
}
4649

0 commit comments

Comments
 (0)