From 5a86ed8eaee204f90883c0f24c80950d06774f91 Mon Sep 17 00:00:00 2001 From: Harrison Hough Date: Fri, 17 Nov 2023 08:50:20 +0200 Subject: [PATCH] fix: prevent endless install loop --- Editor/Module Management/ModuleInstaller.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Editor/Module Management/ModuleInstaller.cs b/Editor/Module Management/ModuleInstaller.cs index 33c3949b..4bebfb43 100644 --- a/Editor/Module Management/ModuleInstaller.cs +++ b/Editor/Module Management/ModuleInstaller.cs @@ -35,17 +35,15 @@ public static class ModuleInstaller static ModuleInstaller() { + Events.registeringPackages -= OnRegisteringPackages; Events.registeringPackages += OnRegisteringPackages; -# if RPM_DEVELOPMENT - modulesInstalled = true; + +#if !READY_PLAYER_ME + InstallModules(); + EditorApplication.delayCall += DelayCreateCoreSettings; + DefineSymbolHelper.AddSymbols(); #endif - if (!modulesInstalled) - { - InstallModules(); - EditorApplication.delayCall += DelayCreateCoreSettings; - DefineSymbolHelper.AddSymbols(); - } } /// @@ -66,6 +64,7 @@ private static void DelayCreateCoreSettings() { EditorApplication.delayCall -= DelayCreateCoreSettings; CoreSettingsLoader.EnsureSettingsExist(); + } /// @@ -77,7 +76,6 @@ private static void InstallModules() Thread.Sleep(THREAD_SLEEP_TIME); ModuleInfo[] missingModules = GetMissingModuleNames(); - if (missingModules.Length > 0) { var installedModuleCount = 0f;