Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Simply can't make it working

Discussion in 'Unity Remote Config' started by ChrissTman, Dec 7, 2020.

  1. ChrissTman

    ChrissTman

    Joined:
    Aug 11, 2015
    Posts:
    10
    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)


    upload_2020-12-7_12-6-47.png

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

    upload_2020-12-7_12-8-32.png

    My code:

    Code (CSharp):
    1.  
    2. void Awake()
    3. {
    4.         ConfigManager.FetchCompleted += (x) =>
    5.         {
    6.             print($"fetching remote CFG ... {x.status} ... {x.requestOrigin}");
    7.  
    8.             print(string.Join(", ", ConfigManager.appConfig.GetKeys()));
    9.             print(ConfigManager.appConfig.origin);
    10.             print(ConfigManager.appConfig.assignmentID);
    11.  
    12.             serverURL = ConfigManager.appConfig.GetString("ServerIP");
    13.             showroomId = ConfigManager.appConfig.GetString("ShowroomID");
    14.  
    15.             print($"{serverURL} => {showroomId}");
    16.         }
    17. }
    18.  
    The output:


    Code (CSharp):
    1.  
    2. > fetching remote CFG ... Success ... Remote
    3. > [empty string]
    4. > Default
    5. > [empty string]
    6. >  =>
    7.  
    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.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. ChrissTman

    ChrissTman

    Joined:
    Aug 11, 2015
    Posts:
    10
    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 :)
     
    JeffDUnity3D likes this.