Best Practices


Use Unity's Own Serializer Where Possible!

For MonoBehaviours/Components and ScriptableObjects the Odin Serializer does not replace, but rather extends the existing Unity serializer.

Odin does this by first serializing all the data Unity doesn't touch and converts it to a data storage format that Unity understands, and a Unity object list. Unity then serializes this data along with the rest of the object.

This effectively means that there will always be two serialization passes when you use Odin. This, of course, also means that using the Odin Serializer will always be slower than using just Unity's serializer. We therefore recommend only using Odin when you need the extra flexibility that Unity's serializer doesn't offer.

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.