Reputation: 1061
I am working on a Unity game that uses AssetBundles and can be published to both iOS and Android devices. I also have three dev environments where I publish the builds for internal testing. To grab the files from the assetbundle 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 keep making a new build for each environment. What would be the best practice to externalize config settings? Is there one?
Upvotes: 3
Views: 1772
Reputation: 526
If you want to be able to change the base URL without redeploying the project, I think your best shot is to use some intermediate URL.
You may require the bundle from some www.mygame.com/bundle/platform who will download the right file whenever needed.
You can also read the base URL from a classic file using Stream. You can then edit the file to change the URL without rebuilding the whole project.
Upvotes: 1