public void SaveTowerState() { SaveTower data = new SaveTower(stages); string value = JsonUtility.ToJson(data); PlayerPrefs.SetString("TowerStages", value); }
private List <Games> GetCurrentStages() { Debug.Log("LLL"); if (!PlayerPrefs.HasKey("TowerStages")) { return(null); } string jsonData = PlayerPrefs.GetString("TowerStages"); SaveTower st = JsonUtility.FromJson <SaveTower>(jsonData); if (st.stages.Count == 0) { return(null); } return(st.stages); }