Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Should use ConfigManager.appConfg.GetString for all origin types?

Discussion in 'Unity Remote Config' started by LesBloom, Feb 4, 2022.

  1. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    167
    Hello,

    If, for some reason, my FetchConfigs call results in a response other then Success/Remote, do I still call ConfigManager.appConfg.GetString to get the key/value pairs?

    Will this method know to pull from the local cache or default values when appropriate?

    Or do I need to switch off of the ConfigFesponse.requestOrigin value and query some other method?

    Thank you
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, still use GetString. If no Internet, it will automatically pull from the local cache (if there was a previous successful connection) or use the default if not.
     
  3. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    167
    Awesome! Thank you for the quick reply, @JeffDUnity3D, I appreciate it. Cheers