Skip to content

fix: Remove references to live env (and also stage env)#424

Open
kirre-bylund wants to merge 1 commit intodevfrom
fix/remove-env-switch
Open

fix: Remove references to live env (and also stage env)#424
kirre-bylund wants to merge 1 commit intodevfrom
fix/remove-env-switch

Conversation

@kirre-bylund
Copy link
Contributor

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ENV URL override handling from LootLockerConfig.
  • 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.

Comment on lines 417 to 421
[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;
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
EditorPrefs.DeleteKey(selectedGameName);
EditorPrefs.DeleteKey(environment);
EditorPrefs.DeleteKey(firstTimeWelcome);
EditorPrefs.DeleteKey(newSession);
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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");

Copilot uses AI. Check for mistakes.
{
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@JohannesLoot JohannesLoot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment on the hardcoded color, but other than that merge away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants