Skip to content

Saving Loading local data

mika edited this page Dec 22, 2017 · 1 revision

Saving / Loading local data

  • void SaveString(string key, string data)
  • 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
Clone this wiki locally