Setting Environments for UGS and RemoteConfig Without Needing Name and ID

For the general UGS setup I am using the environment name:

var options = new InitializationOptions();
await UnityServices.InitializeAsync(options);

But for RemoteConfigs, I they reccomend using the envirnment's ID to initialize:


Is there a way to initialize either of these the opposite way such that I only need to store/modify a single variable an have both point to a new environment?

Hi Tomumental,

Thanks for your feedback.
I will report this to the team and see if there is a way to unify both into one.


If the ConfigManager had :
ConfigManager.SetEnvironmentName("development") would this do the trick?


It was brought to my attention that you would like to have the 1 call that would also set the environment for remote config?

We are looking into this feedback. Thanks again

Yep ConfigManager.SetEnvironmentName("development"); would be perfect!

1 Like

Hi @Tomumental ,
As a workaround you can try the following:

var options = new InitializationOptions().SetOption("", "dev");
await UnityServices.InitializeAsync(options);

This would let you set the environment name through the options.

I have tested this locally with success. Let me know if you have any issues.

All the best,

Thanks that works!

1 Like