Multiple AutoSaveManagers

Discussion and help for Easy Save 3
Post Reply
Berncat
Posts: 14
Joined: Tue May 26, 2020 12:28 am

Multiple AutoSaveManagers

Post by Berncat »

Hi, I'm trying to understand some of the underlying mechanics to see how to use autosave more effectively.

1. Each scene needs its own autosave manager added to it, each with its own default settings that need to be changed to unique ones if necessary. Is it possible to use a single autosave manager that is persistent from the initial scene, or at least a prefab of the autosave manager which is dropped in each scene?

2. What if I have many, potentially hundreds if not thousands of prefabs that could potentially be instantiated at runtime. Right click adding reference to manager only seems to add the reference to the current scene's manager. If this is the case wouldn't I need to add every prefab reference to every scene with autosave? I feel like I'm missing something vital.

3. Autosave's default save path is SaveFile.es3, the default es3 save settings save to SaveData.es3. Is there a reason that these two save to different files? Is it possible to have both save to the same file?

I currently load a savefile into the cache from a savefile, and then do all gameplay through the cache, on hard saves creating a copy of the cache back as a savefile and renaming it to whatever current save name the player has.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Multiple AutoSaveManagers

Post by Joel »

Hi there,

It's necessary to have an Auto Save Manager in each scene because this will have access to all of the objects in the scene. Having a manager in DontDestroyOnLoad essentially adds that object to a new scene which never gets destroyed, but also means that it's not coupled with any scene and therefore can't get the required references.

Objects and prefabs which are directly referenced by a scene will be added to the manager automatically. So if you want them added automatically, ensure your scene references them prior to runtime.

Regarding filenames, the default is the same for both at our end? Please could you let me know what version of Easy Save you are using?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Berncat
Posts: 14
Joined: Tue May 26, 2020 12:28 am

Re: Multiple AutoSaveManagers

Post by Berncat »

When you say automatically references them ahead of time, is that only if they are already in the scene? What about prefabs instantiated by ES3AutoSave.Instantiate(Prefab)? In my case my game is primarily based around instantiating many prefabs into the scene during runtime. Does ES3AutoSave.Instantiate automatically add a reference to the engine of the prefab being instantiated?

To answer your third question, I may be mistaken. Are the settings in the AutoSave tab populated by the ES3 Manager in the scene exclusively? Or does the manager also populate the "Settings" tab as well? If the settings tab is not changed between different scenes then it is something I changed myself.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Multiple AutoSaveManagers

Post by Joel »

Hi there,

I'm not aware of an ES3AutoSave.Instantiate method?

Just to clarify, in my previous statement I'm speaking about the base prefab which you are instantiating from (i.e. the prefab GameObject in Assets) rather than the prefab instance.

The settings in the Auto Save and the settings in the Settings window are separate, but the filename defaults to the same for both.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Berncat
Posts: 14
Joined: Tue May 26, 2020 12:28 am

Re: Multiple AutoSaveManagers

Post by Berncat »

Ah so sorry for the confusion, you're right that method doesn't exist, is there a preferred way to instantiate prefabs at runtime and have them saved using the autosave? Also for the save settings that makes more sense, was not aware if the main settings were overridden on a scene by scene basis.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Multiple AutoSaveManagers

Post by Joel »

Hi there,

This is covered in the Auto Saving Prefab Instances section of the Auto Save guide:
https://docs.moodkie.com/easy-save-3/es ... -instances

After following these instructions, whenever you instantiate the prefab, the prefab instance will be saved.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply