From 6491987f556d11e47731f988f1e164e0d8d448ef Mon Sep 17 00:00:00 2001 From: Erik Bylund Date: Mon, 11 Dec 2023 16:22:20 +0100 Subject: [PATCH] Guarded the caller sites with ifdefs for commandline options --- Runtime/Game/Resources/LootLockerConfig.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Runtime/Game/Resources/LootLockerConfig.cs b/Runtime/Game/Resources/LootLockerConfig.cs index c48a893d..ab88ef20 100644 --- a/Runtime/Game/Resources/LootLockerConfig.cs +++ b/Runtime/Game/Resources/LootLockerConfig.cs @@ -23,7 +23,9 @@ public static LootLockerConfig Get() if (settingsInstance != null) { settingsInstance.ConstructUrls(); - settingsInstance?.CheckForSettingOverrides(); +#if LOOTLOCKER_COMMANDLINE_SETTINGS + settingsInstance.CheckForSettingOverrides(); +#endif return settingsInstance; } @@ -60,8 +62,10 @@ public static LootLockerConfig Get() throw new ArgumentException("LootLocker config does not exist. To fix this, play once in the Unity Editor before making a build."); } #endif - settingsInstance?.ConstructUrls(); - settingsInstance?.CheckForSettingOverrides(); + settingsInstance.ConstructUrls(); +#if LOOTLOCKER_COMMANDLINE_SETTINGS + settingsInstance.CheckForSettingOverrides(); +#endif return settingsInstance; }