October 2016
Beginner
506 pages
10h 1m
English
Saving data is always important, especially in games where you need to keep track of the player's progress or at the very least maintain a track record of scores, plays, and other important data.
Within Unity, there is only one method of storing data natively, and that is PlayerPrefs. It is very simple to use and very flexible, although it does have a hard limit of 1 MB of storage for the web player. It is possible to serialize data into PlayerPrefs (and some developers do this), but generally if you need to serialize, most developers build their own system.
PlayerPrefs is simply a key dictionary to store individual variables as a key in the Unity runtime data store. On its own, it has to read each and every ...
Read now
Unlock full access