From 75c65f91949b2c6c3c33547536b6a33e0661021d Mon Sep 17 00:00:00 2001 From: sator-imaging <16752340+sator-imaging@users.noreply.github.com> Date: Mon, 20 Mar 2023 23:36:44 +0900 Subject: [PATCH] fix: managing flag --- Editor/USGUtility.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Editor/USGUtility.cs b/Editor/USGUtility.cs index acab79f..dbecd54 100644 --- a/Editor/USGUtility.cs +++ b/Editor/USGUtility.cs @@ -34,6 +34,7 @@ public static void ForceGenerateByName(string clsName, bool showInProjectPanel = if (path == null) return; + var restoreOverwriteSetting = USGEngine.IgnoreOverwriteSettingByAttribute; USGEngine.IgnoreOverwriteSettingByAttribute = true; // always disabled after import event. // NOTE: Invoking unity editor event while building app causes fatal error. @@ -41,6 +42,8 @@ public static void ForceGenerateByName(string clsName, bool showInProjectPanel = if (BuildPipeline.isBuildingPlayer) { USGEngine.ProcessFile(path); + // because of Editor event doesn't happens. + USGEngine.IgnoreOverwriteSettingByAttribute = restoreOverwriteSetting; return; }