Simply can't make it working

Hey there, what ever i do i can’t seems to get any configuration what so ever.
(In editor)
2019.4.9f1

Packge: 1.0.9

The admin dashboard panel…
There were 2 environments created regardless of what i did.
Release and Development, + i added Default, since it seemed like a magical keyword.

So these are my Environments (image 1)

My config looks like this, with 3 string values (image 2) (all environments have the same 3 values in a config)

My code:

void Awake()
{
        ConfigManager.FetchCompleted += (x) =>
        {
            print($"fetching remote CFG ... {x.status} ... {x.requestOrigin}");

            print(string.Join(", ", ConfigManager.appConfig.GetKeys()));
            print(ConfigManager.appConfig.origin);
            print(ConfigManager.appConfig.assignmentID);

            serverURL = ConfigManager.appConfig.GetString("ServerIP");
            showroomId = ConfigManager.appConfig.GetString("ShowroomID");

            print($"{serverURL} => {showroomId}");
        }
}

The output:

> fetching remote CFG ... Success ... Remote
> [empty string]
> Default
> [empty string]
>  =>

this happens twice, for Cache and Remote.
All the other forum posts seems like the service should be working.

SECOND problem is that i seem to not be able to write:
ConfigManager.SetEnvironmentID(...)

the method is simply not there.

And so, i tried updating the package to all the other versions. I still couldn’t use the SetEnvironmentID method. I got a dependency conflict with Json.NET. But that shouldn’t stop the update, should it not? Since the PackageManager UI showed X version as expected.

Any help is much predicated.

Please try with Remote Config 2.0, this should help Code integration | Remote Config | 2.0.2-exp.1

ah… I had Json.NET from the asset store in the project. The newer version has a dependecy to Json.NET package. So there was a conflict in assembly, but the errors i got were “clearable”, so i thought it’s not important error and that it is using the AssetStore one.

Apparently, it didn’t compile. It didn’t change the package but most importantly, the package manager showed that it is updated.

Well, it works now! Thank you for pointing out the optimal version. But the issue it self was old version (1.0.9) + assembly collision while upgrading to anything else.

I’m glad that it is working now. Thanks again :slight_smile:

1 Like