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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Wait for remote config to load..

Discussion in 'Unity Remote Config' started by tsandecki, Feb 24, 2020.

  1. tsandecki


    Jul 1, 2013
    Simple question:
    It there a way to wait for remote config to load?

    I need some prop. to init my for example available resource in game but here comes some problem. Remote conf is loaded in Awake but using
    ConfigManager.FetchConfigs to it will fill config map when finished but in the mean time I've already created my resource status bar (in another object in Start method) :-(
  2. JeffDUnity3D


    Unity Technologies

    May 2, 2017
    Could you not place your FetchConfig prior to your other code in Start? However, it's my understanding that Awake is indeed called prior to Start But I suspect your issue with with
    ApplyRemoteSettings as the callback, perhaps completing after your Start method?
  3. rambod


    Unity Technologies

    Mar 2, 2018
    @tsandecki ah this could be due to async nature of the Remote Config request, like @JeffDUnity3D pointed, the request can return after Start has ran. The best way would be to load your game on Start, but not start the game. Once the Remote Config request has returned, then you can proceed starting the game, kinda like a loading screen. I can give you an example of this would work if you'd like.
    vd_unity likes this.