The OdinSerialize And The ShowInInspector


There is a very big difference between OdinSerialize, or SerializeField for that matter, and ShowInInspector, though it may not be obvious at first. They both usually cause something to be shown in the inspector, but with ShowInInspector, whatever is shown will not be saved. Use OdinSerialize if you want to both show something in the inspector, and have it be saved.

If you've put OdinSerialize on a member, and it still doesn't show up in the inspector, it is because the attribute is not actually causing the member to be serialized - for example, a non-auto property or a virtual or abstract auto-property will never be serialized by Odin. Nor will a property which is also declared on an interface that is implemented by the defining class, or one of its inherited classes (as this causes the property methods to become virtual).

You can combine HideInInspector and OdinSerialize, if you want something saved, but not shown in the inspector.