ActionSequenceDrawer

Specialized Odin property drawer for ActionSequence. Extends ActionDrawer<TAction> to render the sequence's child action list and action variables as two distinct sections within the foldable body. Disables the progress indicator since sequences manage multiple child actions.

Definition

Namespace: Paragon.Core.ActionSystem.Editor Assembly: Paragon.Editor.dll

[DrawerPriority(0.0, 0.0, 3005.0)]
public class ActionSequenceDrawer<TActionSequence> : ActionDrawer<TActionSequence>
    where TActionSequence : ActionSequence

Inherits: ActionDrawer<TActionSequence> Type Constraint: TActionSequence : ActionSequence

Remarks

This drawer demonstrates the standard pattern for extending ActionDrawer to handle a specialized Action subclass:

  1. Higher priority (3005 vs 3000) so Odin picks this drawer for ActionSequence fields instead of the base ActionDrawer.

  2. Overrides Initialize() to disable the progress indicator (sequences don't show a single progress bar — each child action has its own).

  3. Overrides DrawBody() to render two child properties:

    • actionSequence — the List<Action> displayed as an Odin list with the label "Sequence"

    • actionVariables — the sequence's own variables, displayed below

The header (foldout + polymorphic selector) is inherited unchanged from ActionDrawer.

Quick Lookup

Goal
How

Change the default label

Override defaultLabel property

Add controls to the body

Override DrawBody(), call base.DrawBody() or reimplement

Show progress indicator

Set showProgressIndicator = true in Initialize() (disabled by default for sequences)

Properties

defaultLabel

The default label for ActionSequence fields. Overrides the base "Action" label.

Methods

Initialize

One-time setup called by Odin. Disables the progress indicator for sequence drawers.

Behavior:

  • Calls base.Initialize()

  • Sets showProgressIndicator = false

DrawBody

Renders the sequence list and action variables as two stacked sections inside the foldable body.

Layout Structure:

Behavior:

  • Wraps content in SirenixEditorGUI.BeginFadeGroup / EndFadeGroup controlled by isExpanded

  • Temporarily resets SirenixGUIStyles.PropertyMargin margins to RectOffset(0,0,0,0) for the sequence list, then restores to RectOffset(3,3,2,2)

  • Draws the actionSequence child property with label "Sequence"

  • Draws the actionVariables child property below with default label

Extension Points

Optional Overrides

Method / Property
Purpose

defaultLabel

Change the foldout label

Initialize()

Additional one-time setup (call base.Initialize() first)

DrawBody()

Customize the body layout

DrawHeader(GUIContent)

Inherited from ActionDrawer — customize the header

Implementation Requirements

When subclassing ActionSequenceDrawer, you MUST:

  1. Use a DrawerPriority higher than 3005

  2. Constrain the type parameter to your custom ActionSequence subclass

You SHOULD:

  • Call base.Initialize() in Initialize() overrides

  • Maintain the two-section body pattern (sequence list + variables) for consistency

Common Pitfalls

circle-exclamation
circle-exclamation

Examples

Custom Drawer for a Specialized Sequence

See Also

Last updated