How to use ISerializationCallbackReceiver in Unity (Patreon)
Published:
2022-03-04 08:11:37
Imported:
2026-06
haven't archived this post yet. have a subscription? use the importer!
Content
Hey!
In my previous Inventory system tutorial we have used ScriptableObject (SO) to store data about items in our game. Since it had the sprite of the item we had to place items on the map with a red tag "Item" and when we pressed PLAY the sprite was modified to represent this item.
Unity allows us to attach our own code to the serialization process using ISerializationCallbackReceiver - long story short we can automatically update the Sprite of our sprite renderer in the editor to make our level design easier :)

I hope that you will enjoy this tutorial :)
Files
Previews only