From a8c30578bf237ae1d0efe0b8a70bd3264b7cd97f Mon Sep 17 00:00:00 2001 From: ShutovKS Date: Mon, 21 Oct 2024 01:02:38 +0300 Subject: [PATCH 1/2] Fixed build conflict, endless import of resources. Delay the reset operation to ensure Unity is no longer in the build process. For Unity 6 --- Editor/LLMBuildProcessor.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Editor/LLMBuildProcessor.cs b/Editor/LLMBuildProcessor.cs index e5e61b0f..af541480 100644 --- a/Editor/LLMBuildProcessor.cs +++ b/Editor/LLMBuildProcessor.cs @@ -51,8 +51,17 @@ public void OnPostprocessBuild(BuildReport report) public void BuildCompleted() { +#if UNITY_6000 + // Delay the reset operation to ensure Unity is no longer in the build process + EditorApplication.delayCall += () => + { + Application.logMessageReceived -= OnBuildError; + LLMBuilder.Reset(); + }; +#else Application.logMessageReceived -= OnBuildError; LLMBuilder.Reset(); +#endif } } } From ba8cd38004e868812db3cfadbce921f72b465451 Mon Sep 17 00:00:00 2001 From: ShutovKS Date: Mon, 21 Oct 2024 22:22:46 +0300 Subject: [PATCH 2/2] Removed condition for Unity 6 for the rest --- Editor/LLMBuildProcessor.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Editor/LLMBuildProcessor.cs b/Editor/LLMBuildProcessor.cs index af541480..f0638a88 100644 --- a/Editor/LLMBuildProcessor.cs +++ b/Editor/LLMBuildProcessor.cs @@ -51,17 +51,12 @@ public void OnPostprocessBuild(BuildReport report) public void BuildCompleted() { -#if UNITY_6000 // Delay the reset operation to ensure Unity is no longer in the build process EditorApplication.delayCall += () => { Application.logMessageReceived -= OnBuildError; LLMBuilder.Reset(); }; -#else - Application.logMessageReceived -= OnBuildError; - LLMBuilder.Reset(); -#endif } } }