Editor

Custom Unity Editor tooling for the Action System. Provides property drawers and custom inspectors that enable polymorphic selection, foldable bodies, progress indicators, and play/stop controls for actions directly in the Unity Inspector.

Architecture

spinner

Editor Components

Component
Type
Draws
Purpose

Property Drawer

Polymorphic action selector with foldable body and progress indicator

Custom Editor

Adds Play/Stop buttons to the ActionPlayer inspector

Property Drawer

Extends ActionDrawer to show the sequence list alongside action variables

Drawer Hierarchy

The editor drawers mirror the runtime inheritance chain:

spinner

Key Patterns

Drawer Priority System

Odin uses [DrawerPriority] to resolve which drawer handles a given type. Higher priority wins:

Drawer
Priority
Constraint

ActionDrawer<TAction>

(0, 0, 3000)

where TAction : Action

ActionSequenceDrawer<TActionSequence>

(0, 0, 3005)

where TActionSequence : ActionSequence

ActionSequenceDrawer has a higher priority than ActionDrawer, so Odin picks it for ActionSequence fields while ActionDrawer handles all other Action fields.

Polymorphic Object Field

All action drawers use SirenixEditorFields.PolymorphicObjectField() in the header, which provides a dropdown to select any concrete Action subclass. This enables Inspector-driven type switching without custom code.

Extension Pattern

To create a custom drawer for a new Action subclass:

Dependencies

Dependency
Usage

Odin Inspector

OdinValueDrawer<T>, OdinEditor, SirenixEditorGUI, SirenixEditorFields

Paragon.Editor

DrawGUI utility for layout helpers and styling

UnityEditor

ObjectNames, CustomEditor

See Also

Last updated