public void SaveData() { //insert all here! PlayerState.Save(); SceneState.Save(); QuestState.Save(); ES2.Save(true, folder + "IsSaved"); }
IEnumerator Unloader(string Name) { yield return(new WaitForSeconds(0.01f)); QuestManager.instance = null; SceneManager.UnloadSceneAsync(Name); if (loadedScene.Contains(Name)) { loadedScene.Remove(Name); } SceneState.Save(); }
public void LoadScene(string sceneName) { if (!SceneManager.GetSceneByName(sceneName).isLoaded) { SceneManager.LoadScene(sceneName, LoadSceneMode.Additive); if (!loadedScene.Contains(sceneName)) { loadedScene.Add(sceneName); } Debug.Log(sceneName + " has been loaded"); MusicManager.instance.LevelWasLoaded(sceneName); SceneState.Save(); } }