I’m trying to determine a best practice for storing configuration settings. I’ve seen 4 ways, and each way I consider unreasonable. But perhaps my understanding is broken. Please let me know if there is a good solution I can use. Here are the considerations I had.
-
Unity does not appear to have any kind of AppSettings. I.e. like Visual Studio dlls/exes/services might. (PlayerPrefs expressed in #3, it is different.)
-
Web Player (which the project uses) does not support File IO, to store my own config.xml/config.json type file.
-
PlayerPrefs appears that it will remain isolated to the local machine. Updating the project does not replace the player prefs, and new variables are supposed to be hardcoded to populate the PlayerPrefs if those variables didn’t already exist. (hard coding is #4)
-
Hard Coding the values creates a hefty inconvenience, as we push our solutions from Dev to Test to Staging to Prod, we have to make sure to replace a code file (or many). (typically build systems are designed to change config files, not code.) Additionally, once the code was built, we wouldn’t be able to reasonably change the settings to experiment with different servers or other configuration changes.
Is my perspective incorrect about one of the 4 issues above? What other options are there? Any help would be greatly appreciated. Thanks!