The player's nickname is saved automatically within PlayerPrefs
because its Saved As parameter is set to PlayerName
. The current language is saved thanks to the Language Selection
component attached to our language popup list.
We'll now use an NGUI component that helps us to save other user interface values like progress bars and checkbox states in PlayerPrefs
.
In order to achieve this, we simply have to attach the UISaved Option
component to NGUI widgets. Select the following GameObjects we'll want to save the option to:
With the preceding selection, follow these steps:
Click the Add Component button in the Inspector view.
Type
save
with your keyboard to search for components.Select Saved Option and hit Enter or click on it with your mouse.
We've just added the UISaved Option
component to our selection.