I have the free version of unity, and i want to have it so if someone downloads a version of the game and i update it, it downloads the update on their client. i searched on google and unity answers but couldn’t find anything. I am using Photon Unity Networking for servers if that makes a difference. i am also really new to unity so i don’t have much to go off of.
2 Answers
2“couldn’t find anything”
Did you even try?
Google Search
Unity doesn’t have a way of updating the client, asset bundles can’t have scripts. So you’re going to have to do it yourself. Have an updater client that is used to check for a patch(es), if not, load the unity client, if there is, download an apply the patch. But don’t forget that you may want to update the patcher itself… that may require you to create another application that can be executed to call the patcher after the patcher has updated.
fun stuff.
you can create a simple page hosted at some link as XML or JSON or even as a simple text which contains current version available in playstore.
When Game starts use WWW class to fetch that online page and compare it with version you saved in your game, you can save current version of your game as text file in resources folder or as a static final variable.
so when you update a new version in playsore just change that online page.
when old version will fetch that page and compare with local one you will know that update is available and show popup or something.
you can also use Application.OpenURL to open playstore link of your game when user clicks update.
> static final this isn't java > you can also use Application.OpenURL to open playstore link of your game when user clicks update how did you gain enough information from the post to assume it was targeting android?
– Landernyou can save data( like maps or new models or prefabs etc) without updating application inon Applicati.persistentDataPath and also load it when needed if that is what you are looking for.
– _YashIf you change a script then it will require a binary update regardless of platform. If one wanted to do content updates, AssetBundles would work just fine if using Pro. You could download using WWW, this can create some issues, but you didn't answer my previous question.
– LandernI'm sorry, something just put Android in my mind. But it will work on iOS also.
– _Yashwith static final i meant something that can not be changed, in c# it would be static const . My mistake.
– _Yash