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 : ActionSequenceInherits: ActionDrawer<TActionSequence> Type Constraint: TActionSequence : ActionSequence
Remarks
This drawer demonstrates the standard pattern for extending ActionDrawer to handle a specialized Action subclass:
Higher priority (
3005vs3000) so Odin picks this drawer forActionSequencefields instead of the baseActionDrawer.Overrides
Initialize()to disable the progress indicator (sequences don't show a single progress bar — each child action has its own).Overrides
DrawBody()to render two child properties:actionSequence— theList<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
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/EndFadeGroupcontrolled byisExpandedTemporarily resets
SirenixGUIStyles.PropertyMarginmargins toRectOffset(0,0,0,0)for the sequence list, then restores toRectOffset(3,3,2,2)Draws the
actionSequencechild property with label"Sequence"Draws the
actionVariableschild property below with default label
Extension Points
Optional Overrides
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:
Use a
DrawerPriorityhigher than3005Constrain the type parameter to your custom
ActionSequencesubclass
You SHOULD:
Call
base.Initialize()inInitialize()overridesMaintain the two-section body pattern (sequence list + variables) for consistency
Common Pitfalls
PropertyMargin side effect DrawBody() modifies SirenixGUIStyles.PropertyMargin.margin and restores it afterward. If you override DrawBody() and skip the base implementation, ensure you handle margins correctly to avoid layout issues in surrounding drawers.
Priority between 3000 and 3005 A custom drawer with priority in the range (3000, 3005) will override ActionDrawer but not ActionSequenceDrawer. If your custom Action is not an ActionSequence, this is fine. If it is an ActionSequence subclass, use a priority above 3005.
Examples
Custom Drawer for a Specialized Sequence
See Also
ActionSequence — runtime class this drawer renders
ActionDrawer — base drawer this inherits from
Action System Editor — editor tooling overview
Last updated