public void Load() { if(PlayerPrefs.HasKey("save")){ state = HelperScript.Deserialize<SaveState>(HelperScript.Decrypt(PlayerPrefs.GetString("save"))); } else { state = new SaveState(); Save(); Debug.Log("no save file found. creating new one"); } }
public void Load() { if (PlayerPrefs.HasKey("Save")) { m_saveState = HelperScript.Deserialize <SaveState>(PlayerPrefs.GetString("Save")); } else { m_saveState = new SaveState(); Save(); } }
//Load the previous saved state from player prefs public void Load() { //Do we already have a save if (PlayerPrefs.HasKey("save")) { state = HelperScript.Deserialize <SaveState>(PlayerPrefs.GetString("save")); } else { state = new SaveState(); Save(); Debug.Log("No save file found, creating a new one"); } }