ParagonDrawer

Abstract base class for Paragon property drawers. Wraps Odin Inspector's OdinValueDrawer<TProperty> and adds a convenience target property that directly accesses the drawn value without going through ValueEntry.SmartValue.

Definition

Namespace: Paragon.Editor Assembly: Paragon.Editor.dll

public abstract class ParagonDrawer<TProperty> : OdinValueDrawer<TProperty>

Inheritance: OdinValueDrawer<TProperty> → ParagonDrawer<TProperty>

Properties

Property
Type
Access
Description

target

TProperty

public

Shorthand for ValueEntry.SmartValue — the current property value being drawn

Extension Points

Required Overrides

Method
Purpose

DrawPropertyLayout(GUIContent label)

Main IMGUI drawing method (inherited from OdinValueDrawer<T>)

Optional Overrides

Method
Purpose

Initialize()

One-time initialization (inherited from OdinValueDrawer<T>)

Implementation Requirements

When subclassing, you MUST:

  1. Override DrawPropertyLayout(GUIContent label) to render the property

You SHOULD:

  • Use target instead of ValueEntry.SmartValue for cleaner code

  • Add [DrawerPriority] to control drawer ordering when competing with other drawers

  • Use Paragon's DrawGUI utilities for consistent styling

Examples

Basic IMGUI Drawer

circle-info

For drawers that need UI Toolkit (VisualElement) rendering instead of IMGUI, use ParagonVisualElementDrawer<TProperty> instead.

See Also

Last updated