Hi all!
I had a search but couldn’t see if anyone had encountered this before, sorry if I didn’t search hard enough.
My problem is I have two environments for Remote Config on UGS, ‘test’ and ‘production’. I am setting the environment id in my project based off if you’re in the editor or on a build like this.
#if UNITY_EDITOR
string environmentId = "test";
#else
string environmentId = "production";
#endif
I then go onto set the environment ID in my initialisation, as shown here:
RemoteConfigService.Instance.FetchCompleted += ApplyRemoteSettings;
RemoteConfigService.Instance.SetEnvironmentID(environmentId);
Debug.Log("Env ID: " + environmentId);
(notice that I’m logging the environment id, this prints as ‘test’ in the console).
I later fetch one of my keys and log it to the console.
string fetchedContext = RemoteConfigService.Instance.appConfig.GetString("AIContext");
Debug.Log("Env ID: " + environmentId);
Here are my two environments
Prod
Test
and here is the console, showing that it’s fetching the string from the prod env…
Any help would be appreciated. I have tried reloading the unity editor as I thought maybe it was cached, but as it’s printing the correct environmentID I don’t think it’s that.
Cheers,
Damo