When creating custom property drawers with OdinValueDrawer<T> or OdinAttributeDrawer<TAttribute, TValue> etc, an OdinDrawerAttribute must be defined on the custom drawer class itself in order to specify that the drawer is meant to be included in the inspector.

If no OdinDrawerAttribute is defined, the DrawerLocator will ignore your drawer.

namespace Sirenix.OdinInspector.Editor
public class OdinDrawerAttribute : Attribute


Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector

See Also


Definition Description
OdinDrawerAttribute() Initializes a new instance of the OdinDrawerAttribute class.


[OdinDrawer] // Specify that this drawer must be included in the inspector; without this, it will not be drawn
public class MyCustomTypeDrawer<T> : OdinValueDrawer<T> where T : MyCustomBaseType
    protected override void DrawPropertyLayout(IPropertyValueEntry<T> entry, GUIContent label)
        T value = entry.SmartValue;
        // Draw property here.

        // Optionally, call the next drawer in line.
        this.CallNextDrawer(entry, label);