void OnClick() { if (this.gameObject.GetComponent <Button> ().GetComponentInChildren <Text> ().text == "Clear Data") { this.gameObject.GetComponent <Button> ().GetComponentInChildren <Text> ().text = "Confirm?"; } else { Time.timeScale = 0; ResourceKeeper.Clear(); SaveData.ClearAllSaveData(); Time.timeScale = 1; Application.LoadLevel("PrepScene"); } }
public static void ClearAllSaveData() { ResourceKeeper.Clear(); PlayerPrefs.DeleteAll(); }