Search Unity

RemoteSettings has no values in RemoteSettings.Completed callback

Discussion in 'Unity Remote Config' started by hippogames, Nov 16, 2019.

  1. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Hi! I'm trying to make it work but with no luck. I'm on Unity 2019.2.4f1

    My steps:
    - open Package Manager and Install Remote Config
    - add some values both to Development and Release configurations
    - press Push and Pull, make sure they've appeared in dashboard
    - subscribe to RemoteSettings.Completed
    - run in Unity (press Play)

    Expected result:
    - values received

    Actual result:
    - OnCompleted executed, server response = 200 (OK), NO VALUES RECEIVED

    Also I've checked this on Android with the same result. Is this a bug or I'm making something wrong?
    Btw I can't update Unity as the latest versions don't support Samsung S-Pen (due to active bug).

    upload_2019-11-16_19-8-31.png

    upload_2019-11-16_19-6-48.png
     
  2. rambod

    rambod

    Unity Technologies

    Joined:
    Mar 2, 2018
    Posts:
    58
    Hey @hippogames!

    I think this is happening because you’re using the Remote Settings callback. In the new Remote Config system, configs are not automatically fetched. They need to be fetched by calling ConfigManager.FetchConfigs, and the callback is ConfigManager.FetchCompleted (here are the docs with more info).

    Let me know if you have any trouble with the new APIs!
     
  3. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Thanks, this helped me. I've spent a few hours on trying to find some usefull information. Simply searching "Unity Remote Config" on Google will return only wrong results and your article will be not found.
     
  4. rambod

    rambod

    Unity Technologies

    Joined:
    Mar 2, 2018
    Posts:
    58
    sorry to hear that, but at least I’m glad it was helpful. Easiest way to get to the docs the next time would be to go to the Package Manager UI window, select the package, then there should be a link that says “view documentation” which will take you directly to the docs for that specific version of the package.