fix: Remove references to live env (and also stage env)#424
fix: Remove references to live env (and also stage env)#424kirre-bylund wants to merge 1 commit intodevfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Removes now-obsolete “stage/live environment” targeting options from the Unity SDK configuration/editor tooling, aligning the SDK with a single-environment backend setup.
Changes:
- Removes
LOOTLOCKER_TARGET_STAGE_ENVURL override handling fromLootLockerConfig. - Removes persisted “Environment” EditorPrefs key usage and related helper methods from
LootLockerEditorData.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Runtime/Game/Resources/LootLockerConfig.cs | Drops stage environment URL override preprocessor branch, leaving only local override support. |
| Runtime/Editor/LootLockerEditorData.cs | Removes editor “Environment” preference key and stage/live selection helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [HideInInspector] private static string UrlCoreOverride = | ||
| #if LOOTLOCKER_TARGET_STAGE_ENV | ||
| "api.stage.internal.dev.lootlocker.cloud"; | ||
| #elif LOOTLOCKER_TARGET_LOCAL_ENV | ||
| #if LOOTLOCKER_TARGET_LOCAL_ENV | ||
| "localhost:8080"; | ||
| #else | ||
| null; |
There was a problem hiding this comment.
PR description says stage env is retired and references removed, but the repo still has stage-targeting references in CI (e.g. .github/workflows/run-tests-and-package.yml sets LOOTLOCKER_TARGET_STAGE_ENV / LL_USE_STAGE). If stage is truly removed, CI config should be updated/removed as well to avoid misleading configuration and ensure the pipeline is testing the intended environment(s).
| EditorPrefs.DeleteKey(selectedGameName); | ||
| EditorPrefs.DeleteKey(environment); | ||
| EditorPrefs.DeleteKey(firstTimeWelcome); | ||
| EditorPrefs.DeleteKey(newSession); |
There was a problem hiding this comment.
ClearLootLockerPrefs() no longer deletes the legacy EditorPrefs key that older versions wrote (prefix + "Environment"). Consider still deleting that key (e.g. via an inline string) so users upgrading from older versions can fully reset LootLocker editor state from the Tools menu.
| EditorPrefs.DeleteKey(newSession); | |
| EditorPrefs.DeleteKey(newSession); | |
| // Delete legacy environment key used by older versions so resets fully clear LootLocker editor state | |
| EditorPrefs.DeleteKey(PlayerSettings.productGUID.ToString() + ".LootLocker.Environment"); |
| { | ||
| key.style.borderRightColor = key.style.borderLeftColor = | ||
| key.style.borderTopColor = key.style.borderBottomColor = stage; | ||
| key.style.borderTopColor = key.style.borderBottomColor = new Color(0.094f, 0.749f, 0.352f, 1); |
There was a problem hiding this comment.
Can you extract this to a variable instead?
If we extend on this in the future, we would most likely want to reuse this color and not want to type it in manually.
JohannesLoot
left a comment
There was a problem hiding this comment.
Small comment on the hardcoded color, but other than that merge away!
Resolves issue: https://github.com/lootlocker/index/issues/1174
Since we no longer have multiple environments we remove all references to
live. And while we're at it, retire the "targeting stage" ifdef since stage is no more.