How to manage (very) large scenes ?
How to manage (very) large scenes ?
Hi, I'm currently trying to figure out how to create save files in our upcoming game. The player is evolving in a large scene (several kilometers wide), with ten of thousands of objects in the scene, and probably thousands of object that will need to be saved.
I'm a bit afraid of how ES3 will behave with this kind of setup, as in our current scene the ES3ReferenceManager is storing 600k+ references, and it'll probably be 10 times more with the finished scene. I don't really know how the workflow is supposed to be in this case.
Should i disable the auto-search from the Manager and create my own behavior to keep the references up to date ? (it needs to be automatic as I don't want designers to mess with this and adding references by hand is impossible with this number of objects).
Thanks !
I'm a bit afraid of how ES3 will behave with this kind of setup, as in our current scene the ES3ReferenceManager is storing 600k+ references, and it'll probably be 10 times more with the finished scene. I don't really know how the workflow is supposed to be in this case.
Should i disable the auto-search from the Manager and create my own behavior to keep the references up to date ? (it needs to be automatic as I don't want designers to mess with this and adding references by hand is impossible with this number of objects).
Thanks !
Re: How to manage (very) large scenes ?
Hi there,
Generally in this case you should follow the Improving Performance guide:
https://docs.moodkie.com/easy-save-3/es ... rformance/
If it needs to be automatic and you don't want everything to be added to the manager, you would indeed need to create your own behaviour to keep the references up to date.
All the best,
Joel
Generally in this case you should follow the Improving Performance guide:
https://docs.moodkie.com/easy-save-3/es ... rformance/
If it needs to be automatic and you don't want everything to be added to the manager, you would indeed need to create your own behaviour to keep the references up to date.
All the best,
Joel
Re: How to manage (very) large scenes ?
Interested in knowing more about this. We also have a SaveManager that has a lot of references but I think a lot of the references are actually unnecessary (Shader references, references to objects that aren't involved in saving/loading). Is there a rule in knowing what needs to be referenced? My guess would be anything that contains an ES3 component (AutoSave or Prefab) but I think it can also extend to objects that are saved but do not contain ES3 components, in my case ScriptableObjects.you would indeed need to create your own behaviour to keep the references up to date.
So would a custom behaviour be like so:
1. Add reference to objects in scene with ES3 components
2. Add reference to project assets with ES3 components
3. Add reference to asset reference types but how do we reference all that are needed?
Re: How to manage (very) large scenes ?
Hi there,
The only references which are necessary are ones which are being saved and loaded (i.e. if you're saving a GameObject it'll be the GameObject itself, any Components you're saving, and UnityEngine.Objects in fields which are being saved. It's not possible to automatically determine this as the only person who would know this is the developer.
All the best,
Joel
The only references which are necessary are ones which are being saved and loaded (i.e. if you're saving a GameObject it'll be the GameObject itself, any Components you're saving, and UnityEngine.Objects in fields which are being saved. It's not possible to automatically determine this as the only person who would know this is the developer.
A GameObject doesn't need an ES3Component to be saved, so this isn't a suitable way of determining if something is being saved. You could add your own Component to everything which you know is being saved and use this, but it would be your responsibility to ensure that everything you're saving has this Component.My guess would be anything that contains an ES3 component
All the best,
Joel
Re: How to manage (very) large scenes ?
Think I need a better understanding of what it means to be saved and loaded.The only references which are necessary are ones which are being saved and loaded
1. If I wanted to load an instantiated ES3Prefab as a child of a parent, would the ES3RefManager need a reference to the parent?
2. For loading an instantiated ES3Prefab, does the ES3RefManager need a reference to all the components and objects of the ES3Prefab or just the ES3Prefab GameObject. Also should the localrefs array of the ES3Prefab be filled?
3. If we have a reference to a ScriptableObject but we do not include its dependencies, would all those fields be null on load? Similarly, if we had a reference to a prefab GameObject only, would the prefab load in properly?
4. If I were only interesting in saving a component, I would only need a reference to the component and not its GameObject?
5. I tried using "Exclude reference from Manager" after refreshing the Manager but I still see the reference inside its array. Am I using "exclude correctly"?
6. What does the "Exclude Objects" array in the ES3RefManager do?
Re: How to manage (very) large scenes ?
Correct, because the parent/child relationship is determined by the 'parent' field of the Transform Component. If Easy Save can't get a reference to the parent, it can't save the parent/child relationship.1. If I wanted to load an instantiated ES3Prefab as a child of a parent, would the ES3RefManager need a reference to the parent?
It needs references to everything which is being saved and loaded. The bare minimum would be the GameObject and it's Transform if you're not saving any Components on the GameObject. The localRefs array needs to be filled, but this shouldn't bloat your project because this will only contain things which are already referenced by your project.2. For loading an instantiated ES3Prefab, does the ES3RefManager need a reference to all the components and objects of the ES3Prefab or just the ES3Prefab GameObject. Also should the localrefs array of the ES3Prefab be filled?
Any UnityEngine.Object fields which are in the save data will be loaded as null.3. If we have a reference to a ScriptableObject but we do not include its dependencies, would all those fields be null on load?
If you're not saving any Components on that ES3Prefab, and no parent/child relationship is being saved, then it will be loaded in with all of it's default values.Similarly, if we had a reference to a prefab GameObject only, would the prefab load in properly?
Components can't exist without a GameObject to attach them to, so unless you're using ES3.LoadInto to load it into a specific Component which already exists, you need a reference to the GameObject.4. If I were only interesting in saving a component, I would only need a reference to the component and not its GameObject?
The objects will be excluded the next time the manager is refreshed.5. I tried using "Exclude reference from Manager" after refreshing the Manager but I still see the reference inside its array. Am I using "exclude correctly"?
This just tells Easy Save what references to exclude. Whenever Easy Save refreshes the manager, it will check this list before adding a reference to the manager.6. What does the "Exclude Objects" array in the ES3RefManager do?
Re: How to manage (very) large scenes ?
How do I add a reference component to the Reference Manager? I tried right clicking on the component but I do not see an option to add a reference.
I tried doing this but I still see the reference in the References array. Would the object I selected for exclusion be included into the Exclude Objects array because that array is empty after selecting "exclude reference".The objects will be excluded the next time the manager is refreshed.
Re: How to manage (very) large scenes ?
I've not had any reports of this not working. If you're not using the latest version of Easy Save, please try updating. If that doesn't resolve the issue please could you replicate this in a new project with a simple scene and send it to me using the form at moodkie.com/repro so I can see what is happening.yimingt wrote: ↑Tue Nov 05, 2024 5:12 am How do I add a reference component to the Reference Manager? I tried right clicking on the component but I do not see an option to add a reference.
I tried doing this but I still see the reference in the References array. Would the object I selected for exclusion be included into the Exclude Objects array because that array is empty after selecting "exclude reference".The objects will be excluded the next time the manager is refreshed.
All the best,
Joel
Re: How to manage (very) large scenes ?
Just to be clear on the steps.
1. Refresh ES3ReferenceManager
2. Select objects to exclude. Right click them, "Exclude References(s) from Manager".
3. Refresh ES3ReferenceManager
After the refresh, the objects previously selected should be removed from the References array. Is the process correct?
1. Refresh ES3ReferenceManager
2. Select objects to exclude. Right click them, "Exclude References(s) from Manager".
3. Refresh ES3ReferenceManager
After the refresh, the objects previously selected should be removed from the References array. Is the process correct?
Re: How to manage (very) large scenes ?
You don't need step 1, though that wouldn't stop it from working.yimingt wrote: ↑Wed Nov 06, 2024 7:54 am Just to be clear on the steps.
1. Refresh ES3ReferenceManager
2. Select objects to exclude. Right click them, "Exclude References(s) from Manager".
3. Refresh ES3ReferenceManager
After the refresh, the objects previously selected should be removed from the References array. Is the process correct?
All the best,
Joel