Page 1 of 1

Save and load ScriptableObject

Posted: Tue Jun 16, 2020 7:07 am
by jinliuu
Hi there,

I just integrated ES3 into my game and everything works fine except the scriptableObject type.

The player gameobject of my game contains several child character objects which has their own skill trees and inventories. Those classes contain lists of scriptableObjects which are defined in the editor. I guess the es3 reference manager should have their references in this case. Also the inventory class and skill tree Class are already ES3Types.

However, I got the references issue when I was trying to save and load the entire player gameobject. I got lots of "Reference for skill xx with ID xxx could not be found in easy save's reference manager" error for those scriptableObject types.

Also, If I save and load without restart the game in the editor, everything works fine.

Re: Save and load ScriptableObject

Posted: Tue Jun 16, 2020 8:17 am
by Joel
Hi there,

Please could you private message me a basic project which replicates this? It's likely than an instance of your ScriptableObjects is being created, rather than it being a reference to the original in Assets.

All the best,
Joel

Re: Save and load ScriptableObject

Posted: Tue Jun 16, 2020 10:40 am
by jinliuu
Hi Joel,

I think so. For the inventory system, the item is being created by using something like item.copy() so it create an instance of the item.

For the skill system, the character has a list of skills which reference directly from the resources folder. Should I put it into other folders?

I just send you a basic project. Let me know if you find any problem.

Thanks!

Jin

Re: Save and load ScriptableObject

Posted: Wed Jun 17, 2020 5:34 am
by jinliuu
Hi Joel,

Is there any updates?

Thanks

Re: Save and load ScriptableObject

Posted: Wed Jun 17, 2020 6:15 am
by Joel
Hi there,

I've replied to your PM.

All the best,
Joel