I use some PlayerPrefs
in my Unity app (platforms are: iOS, Android, Windows). Now I want to release update, so it's a question: when users update there apps - will PlayerPrefs
be saved? The problem is that I store the game progress in this prefs and if users will lose it after update - it will be very bad.
Is there reliable information about this question?
You can't. PlayerPrefs doesn't support arrays.
Platform-Independent: One way of saving data in Unity3D in a Platform-independent way is to use the PlayerPrefs class. PlayerPrefs is a static class and it is very easy to use but not reliable. PERSISTENCE - SAVING AND LOADING DATA using DontDestroyOnLoad, PlayerPrefs, and data serialization Video Tutorial by unity.
It works by storing a string, float or integer value to disk with a key, which is a text string that's used to store and recall a preference. For example, to save an integer, simply call the Set Int function of the Player Prefs class and pass in the key you want to use to retrieve it again.
How will you release this update? A new version of the application, or new content streamed in through asset bundles?
If it's a new version of the application, but it's installed as an update and overwrites the old version, then playerprefs will remain unchanged. If it's installed seperately however, the saved data will be lost.
If you're using asset bundles, no worries, nothing will break. ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With