- Home /
How to send game updates to clients?
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.
Answer by Landern · Jan 01, 2015 at 11:47 AM
"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.
Answer by _Yash_ · Jan 01, 2015 at 12:02 PM
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?
you 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.
If 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.
I'm sorry, something just put Android in my $$anonymous$$d. But it will work on iOS also.
So just const?
If you have a const field it's part of the class since it doesn't change ever during runtime, you may call this burnt in.
If you used readonly(not with const), you could modify the variable for an instance member during the constructor of the class as apposed to the class member const.
static need not apply with const.
If the platform was either ios or android, the update would be part of the application publication process.
If it was a webplayer, then the creator can affect it by uploading a new version.
The other platforms require much more love.
Your answer
Follow this Question
Related Questions
Get multiple images from online server and download them to android app 1 Answer
How to update game for happenings while player is away? 0 Answers
Is using WWW to download a server on Update Function bad? 1 Answer
iPhone: Update Assets from Web? 1 Answer
Way to download and load a new scene during runtime? 0 Answers