-
Notifications
You must be signed in to change notification settings - Fork 2
Saving Loading local data
mika edited this page Dec 22, 2017
·
1 revision
- void SaveString(string key, string data)
- saves string to unity PlayerPrefs https://docs.unity3d.com/ScriptReference/PlayerPrefs.SetString.html
- data is persistant even when app is closed or updated
- void LoadString(string key)
- load string from unity PlayerPrefs
- void SaveInt(string key, int val)
- saves into temporary dictionary
- data is cleared on mode change
- int? GetInt(string key)
- queries from temporary dictionary
- returns null if key doesnt exists
- data is cleared on mode change
- bool KeyExists(string key)
- checks from temporary dictionary
- data is cleared on mode change
- void ClearAllKeys()
- clears temporary dictionary
- void RemoveInt(string key)
- removes key from temporary dictionary