Easy Save 3 Manager bad performance

Discussion and help for Easy Save 3
Post Reply
Keeko
Posts: 17
Joined: Sun Nov 15, 2020 9:18 pm

Easy Save 3 Manager bad performance

Post by Keeko »

I have the manager in my scene as I am using it to save references. However, it is storing a lot of references and clicking on the object can sometimes result in it using up to 20GB of RAM. How can i ensure this is only saving references to things i want or how can i prevent it from performing so badly.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Easy Save 3 Manager bad performance

Post by Joel »

Hi there,

The Easy Save 3 Manager should only store references to objects which are already in your scene. Try pressing the 'Optimise' button on the ES3ReferenceMgr Component on the Easy Save 3 Manager to see if this resolves the issue.

If not, I recommend going to Tools > Easy Save 3 > Settings and unchecking 'Auto update references' and 'Add all prefabs to manager'. If you then delete the Easy Save 3 Manager and re-add it, this will remove any existing references from the manager.

For any references that you want to save, you will then need to right-click them and select Easy Save 3 > Add Reference(s) to Manager.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Keeko
Posts: 17
Joined: Sun Nov 15, 2020 9:18 pm

Re: Easy Save 3 Manager bad performance

Post by Keeko »

Can I add the references for scriptable objects in the way you described?
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Easy Save 3 Manager bad performance

Post by Joel »

Hi there,

You can add the ScriptableObject in the same way as any other object, but be aware that sometimes when referencing a ScriptableObject in Assets, Unity will create an instance of it at runtime rather than referring to the one in Assets. This means that the instance ID will change between sessions, so it won't be possible to load it by reference after you leave the scene.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Keeko
Posts: 17
Joined: Sun Nov 15, 2020 9:18 pm

Re: Easy Save 3 Manager bad performance

Post by Keeko »

Hi,

That may be an issue, I have an InventoryItem class. In that class it has a reference to its scriptable object for access to the items data. When I am saving these inventory items it's storing the reference. This often doesn't seem to be an issue in the editor, but I have noticed these references are wrong in the build as soon as you change the scene. How can I avoid this?
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Easy Save 3 Manager bad performance

Post by Joel »

Hi there,

You would need to create your own way of uniquely identifying the ScriptableObject. The simplest way of doing this is by putting all of your ScriptableObjects into an array. Then when saving, you save the index of the ScriptableObject in the array rather than the ScriptableObject itself.

Then when loading, simply fetch the item in the array at that index.

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