What is the proper way to load into the last saved scene from a main menu button (using autosave)?
If I call this using the main menu "load" button, nothing happens:
Code: Select all
ES3AutoSaveMgr.Current.Load();
I'm saving using an on-screen button, which uses ES3's autosave, then saves the current scene manually as "savedScene":
Code: Select all
public string currentScene;
public void Save()
{
ES3AutoSaveMgr.Current.Save();
currentScene = SceneManager.GetActiveScene().name;
ES3.Save("savedScene", currentScene);
}
Code: Select all
public string sceneToLoad;
public void Load()
{
sceneToLoad = ES3.Load<string>("savedScene");
SceneManager.LoadScene(sceneToLoad);
}
Code: Select all
public void Start()
{
ES3AutoSaveMgr.Current.Load();
}
Thanks!