// Data isn't saved at this point.
ES3AutoSaveMgr.Current.Save();
// Data is now saved.
// Data isn't loaded at this point.
ES3AutoSaveMgr.Current.Load();
// Data is now loaded.
Reference with ID 1073397176277201534 could not be found in Easy Save's reference manager. If you are loading objects dynamically (i.e. objects created at runtime), this warning is expected and can be ignored.
I'm getting this warning when loading a save. I understand that this is supposed to happen if the object was created during runtime. The problem is 1 of my list was storing a reference to that object and is now coming up null after loading causing an error when running one of its methods.
Do I have to change the list to store values instead of references? What is the cause of this happening?
I have also noticed that references that are loaded would not be the same references as before. I had 3 objects. 2 of them would get a reference to a variable from Object1. After loading, the variable of the 2 objects don't seem to be a reference to Object1 rather they are new instances of the data.
Is there a way to change it? Maybe something in the ES3Type Script or would I have to reassign the references when loading?
It's not possible to tell for certain from what you've said, but it sounds like the reference is loaded after the list. In this case you would need to load twice: once to load the reference, and once to load the list item.
I have also noticed that references that are loaded would not be the same references as before. I had 3 objects. 2 of them would get a reference to a variable from Object1. After loading, the variable of the 2 objects don't seem to be a reference to Object1 rather they are new instances of the data.
I've not seen this happen before with Auto Save. Please could you replicate this in a new, empty project with a very simple scene and private message it to me with instructions?
What is the purpose of the "Save Children" option in the ES3AutoSave? So far I have noticed that if it's not enabled, objects that were instantiated and placed under the parent won't be placed under the same parent after loading. Am I right in assuming that the "Save Children" option is to allow instantiated objects to be saved under a parent and when loaded would be placed under that parent?
On another note. How does EasySave handle the destruction of default scene objects? The way I understand how it works right now, is that objects and data from the save file are loaded after the scene is loaded. So the scene is loaded like its default form and then the data from the save file is added on top so newly created objects / value changes are brought in later.
Capture.JPG (13.95 KiB) Viewed 3025 times
(Default scene setup)
So right now, I'm trying to the Cube object that would be in the scene by default but it keeps coming back when I reload the save file. I'm guessing it's because the save file doesn't have any data that the object was destroyed thus it keeps coming back. If so, then how would we destroy default scene objects and make sure they stay destroyed when reloading?
Sorry I still don't quite understand what you mean by "override the Auto Save settings". So when it saves all children of the GameObject, would that include all the components of the children?
Note that as previously mentioned, it is only recommended to interact with Auto Save using the Auto Save window, and directly modifying the Auto Save Component is likely to lead to unexpected behaviour.
Today I got a question for the selection of data to save for the AutoSave ES3Type. In the case of inherited data, do I select to save the data from the base script or the child script?