Hi,
I have been implementing save slots for my game, I change the path for the save manager and the autosave path using below:
public void SetSaveSlotAndLoad(int slot)
{
if (slot == 1)
{
ES3AutoSaveMgr.Instance.settings.path = "SaveFile1/AutoSave1.es3";
ES3Settings.defaultSettings.path = "SaveFile1/SaveSlot1";
}
else if (slot == 2)
{
ES3AutoSaveMgr.Instance.settings.path = "SaveFile2/AutoSave2.es3";
ES3Settings.defaultSettings.path = "SaveFile2/SaveSlot2";
}
else if (slot == 3)
{
ES3AutoSaveMgr.Instance.settings.path = "SaveFile3/AutoSave3.es3";
ES3Settings.defaultSettings.path = "SaveFile3/SaveSlot3";
}
else
{
ES3AutoSaveMgr.Instance.settings.path = "SaveFile1/AutoSave1.es3";
ES3Settings.defaultSettings.path = "SaveFile1/SaveSlot1";
}
}
the ES3Settings.defaultSettings.path = "SaveFile1/SaveSlot1";
this works and stays like that until i change it, but the autosave path goes back to default when i quit/load change scene.
Also when the scene loads because it has been set back to default file path the autosave does not load anything.
autsave manger, changing the file path
Re: autsave manger, changing the file path
Hi there,
The Auto Save Manager is specific to the scene, so you would need to change it each time you enter a scene.
All the best,
Joel
The Auto Save Manager is specific to the scene, so you would need to change it each time you enter a scene.
All the best,
Joel
-
- Posts: 13
- Joined: Thu Sep 17, 2020 9:55 am
Re: autsave manger, changing the file path
Thanks again joel, it is working now, just one more question is the below the best way to see if a file and save exists, or is there a function i can use?
if (ES3Settings.defaultSettings.path == "SaveFile1/SaveSlot1")
{
do something
}
else
{
save does not exist
}
if (ES3Settings.defaultSettings.path == "SaveFile1/SaveSlot1")
{
do something
}
else
{
save does not exist
}
-
- Posts: 13
- Joined: Thu Sep 17, 2020 9:55 am
Re: autsave manger, changing the file path
I also noticed its not loading the prefabs that i place in the game once i load the level again.
i set the autosave folder on awake, then i call ES3AutoSaveMgr.Instance.Load();, but non of the prefabs are spawned.
i set the autosave folder on awake, then i call ES3AutoSaveMgr.Instance.Load();, but non of the prefabs are spawned.
Re: autsave manger, changing the file path
Hi there,
You can use ES3.FileExists to check whether a file exists.
Regarding your issue, we've had no reports of this. Please could you replicate this in a new, empty project with a very simple scene using the latest version of Easy Save and private message it to me with step-by-step instructions.
All the best,
Joel
You can use ES3.FileExists to check whether a file exists.
Regarding your issue, we've had no reports of this. Please could you replicate this in a new, empty project with a very simple scene using the latest version of Easy Save and private message it to me with step-by-step instructions.
All the best,
Joel