While the previous recipe illustrates how the static properties allow a game to remember values between different scenes, these values are forgotten once the game application has quit. Unity provides the PlayerPrefs feature to allow a game to store and retrieve data, between the different game-playing sessions:
Saving and loading player data – using PlayerPrefs
Getting ready
This recipe builds upon the previous recipe, so make a copy of that project and work on the copy.
How to do it...
To save and load the player data using PlayerPrefs, follow these steps:
- Delete...