void Awake() { if (saveManager == null) { saveManager = this; } else if (saveManager != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); gameList = new Games[3]; currentRoom = null; LoadGamesFromFile(); //TEMP - Until the UI manager can call it try { SelectGame(0); LoadGame(); } catch (Exception e) { Debug.Log(e.Message); InitManager(); SelectGame(0); SaveGame(); } }
public void OnSceneChange(string sceneName) { currentRoom = activeGame.GetRoomSaveData(sceneName); }