Remotesettings:default values?

Hi,
Have successfully implemented remote settings but a few details are unclear to me around the behaviour of the variables when the user has no internet connection:

  • If a user starts the app first time, without internet. What settings are used? The ones showing in the remote settings window in the editor at the time of build?
  • When I give a public variable a value in the inspector, will this value be taken or the one from #1 when the user starts the app without internet?
  • Say the user has gotten internet at some point and syncs. But then starts a session without internet: will the last known values be assigned, or the value from the inspector (#2), or the defaults (#1).

Thanks so much :slight_smile:

That depends on how you implement Remote Settings. You can find more details in the Remote Settings scripting page. In general, you should use assign default values in your RemoteSettings method calls, in case of this situation.

https://docs.unity3d.com/Manual/UnityAnalyticsRemoteSettingsScripting.html

It will use the default value not the value from the Inspector. The best practice may be to use a similar approach as the example script. Create a variable that is visible in the Inspector and set that as the default. That way the correct default is loaded, but you can modify it in the Inspector as needed.

It will use the last known Remote Settings value.

Ah, i hadn’t looked at the remote settings scripting so much as I have only used the remote settings component. But I think I am all set now :slight_smile: Thanks!