The Auto Save Component allows you to save supported Components on a GameObject.
For information on what components/variables will be saved, please see the Saving & Loading GameObjects/Prefabs guide.
Enabling Auto Save for GameObjects
To enable Auto Save for a GameObject, add an ES3 Auto Save Component to it.
Additionally, to save all children of that GameObject, select the Save Children checkbox on the ES3 Auto Save component.
Enabling Auto Save for Prefabs
To Auto Save prefab instances:
- Enable the original prefab using the instructions in the Saving and Loading Prefab Instances guide.
- Add an ES3 Auto Save Component to the prefab.
- Now whenever you instantiate a prefab, it will be auto-saved.
Changing Auto Save Settings
To change when Auto Saves are saved and loaded, or to change advanced settings, go to Window > Easy Save 3 > Auto Save to change the settings for the current scene.
Triggering Auto Save from Code
It is also possible to trigger the Auto Save to save and load from code.
To do so, get a reference to the ES3AutoSaveMgr component on the Easy Save 3 Manager, and call it’s Save() and Load() methods.
It’s recommended to set the Save Event and Load Event to None when manually triggering an Auto Save.
var autoSaveMgr = GameObject.Find("Easy Save 3 Manager").GetComponent<ES3AutoSaveMgr>();
// To save
// To load