// Use this for initialization void Awake() { if (!SaveDataManager.IsSaveDataExists()) { SaveDataManager.CreatePlayerData(); } SaveDataManager.LoadPlayerData(); Debug.Log(PlayerDataRef.BestRecord[0]); }
public void LoadCharacter() { PlayerData dataToLoad = SaveDataManager.LoadPlayerData(); if (dataToLoad != null) { currentPlayerData = dataToLoad; } else { Debug.Log("no save file found"); return; } UpdateCharacterDisplay(); startMenu.SetActive(false); characterDisplayPanel.SetActive(true); }
public void OnOpenGame() { saveDataManager.LoadInPersistent(); saveDataManager.LoadPlayerData(true); }
public void DeleteData() { SaveDataManager.DeleteData(); SaveDataManager.CreatePlayerData(); SaveDataManager.LoadPlayerData(); }