- Home /
Auto removing entries form a scriptableobject list when asset is deleted.
Hey.
So ive been working on an Inventory asset/item data base system. My basic setup is a single scriptableobject (ItemDataBase) which contains a list of other scriptableobjects (items).
Im wondering if its possible to automatically remove my empty entries from my database items list when the item asset is deleted? Since currently i have a validate function that i must run every time to remove entries in the list that are null, after they where deleted.
Any ideas?
ive thought of using OnDestroy() on each of my scriptableobject items and call for their entry to be removed from the itemdatabase once they are deleted, but it doesnt seem to be called if you delete the asset?
Do scriptableobjects get any call backs when they are deleted?
Any suggestions or ideas would be much appreciated.
Thanks ~Scott