Unity Games: Guidelines for Customizing the Configuration File

I am working on a Unity game that uses AssetBundles and can be published to both iOS and Android devices. I also have three developer environments where I publish a build for internal testing. To grab files from a federated server, I have five different base URLs to pull from, depending on the environment.

I want to externalize the base url so that I don't have to create a new assembly for each environment. What would be the best practice to externalize the configuration settings? There is one?

+3


source to share


1 answer


If you want to change the base url without redeploying the project, I think your best shot is to use an intermediate url.

You may need a package from some site www.mygame.com/bundle/platform, which will download the correct file as needed.



You can also read the base url from a classic file using Stream. Then you can edit the file to change the url without rebuilding the whole project.

+1


source







All Articles