Best practices for managing settings with multiple (two) environments?

Hi, just a disclaimer, I’m very new to the remote config package.

I’m wondering, what is the best practices for managing settings on multiple environments?
I see a couple options:

  • Manually making sure that the keys are all present in both environments
  • Using default values with ConfigManager.appConfig.GetX(key, defaultValue)
  • Using HasKey and only getting the value if the key is there

Now obviously 2 and 3 are conceptually similar, so I’ll collapse them together. However I’m not sure what the best approach is though. On the one hand, using the first option is tedious, and can seem a bit error prone.

But the other solution can sort of silently fail, if I expect a key to be there, but I forgot to assign it.

I think the ideal solution here would be to sort of sync the keys between all environments, perhaps with some default value. This way it feels much less error prone when adding them, and you don’t silently fail if a key is missing as well.

However if that last thing is not possible, what are the best practices here?

@Bmandk No best practices to speak of, generally what works best in your development flow. These links may help Remote Config REST APIs | Remote Config | 2.0.2-exp.1 and New feature announcement: "Copy Config Settings"

@JeffDUnity3D Ah, I had missed the copy config option, that seems close enough, thanks!

I had also considered the REST client, but this project is too small to set that up here. But I’ll definitely keep that in mind for the future.

1 Like