- Home /
Question is too broad; recommend forums or search, instead. Remote serialization is a common problem.
How does/can Unity handle offline sync with backend?
I've searched for an answer to this question but haven't been able to come up with anything. Our game has a backend server where we save/load progress so people can play on multiple devices. Internet connection isn't always guaranteed on mobile devices, so we need to make sure if they are offline the app caches saves for next time there is internet.
Previously we were only iOS, so we just used native libraries to handle it (namely Parse). Parse has a Unity SDK but it does not have offline save functionality. Is there any kind of crossplatform way of doing something similar, or would we have to build a custom solution? I feel like this isn't that uncommon a problem to have...
Hey,Have u got a solution for this?? I am facing the same problem. Please help me out if u found any solution.
Answer by DavidMann · Nov 23, 2014 at 02:51 AM
This may or may not be helpful, but I think researching PlayerPrefs might be a good first step: http://docs.unity3d.com/ScriptReference/PlayerPrefs.html
Answer by SquigglyFrog · Nov 23, 2014 at 03:14 AM
Im working on a similar project and all I'm doing is having the code check for a connection at each save point. If the connection is there, it uploads.. everything is saved locally anyways. If there is no connection, things are saved locally and then the game periodically checks for access. If it determines it has access, it compares the timestamp between the local file and the remote, and updates. This is probably something your just going to need to write on your own, but once written should work fine across all your platforms. Use your playerprefs or create a local save file and just make sure you update your timestamps.. Mines pretty simple since games are saved to the local storage and to a mysql database.. but I built it all custom so.
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
how to Ping Google.com 1 Answer
Multiplayer Persistant Gaming 1 Answer
Pubnub vs Parse vs Photon vs ? for multiplayer positioning 1 Answer
Lan Host Netwroking Room List? 0 Answers