ActionPlayer
MonoBehaviour component that holds a single Action reference and provides Play() / Stop() methods. Designed for Inspector-driven action configuration using Odin serialization.
Definition
Namespace: Paragon.Core.ActionSystem Assembly: Paragon.dll
public class ActionPlayer : SerializedMonoBehaviourInheritance: MonoBehaviour → SerializedMonoBehaviour → ActionPlayer
Remarks
ActionPlayer is a thin wrapper that bridges the Action System with Unity's component model. It uses SerializedMonoBehaviour from Odin Inspector, which enables polymorphic serialization of the Action field — meaning you can assign any Action subclass (including ActionSequence) directly in the Inspector.
Inspector workflow: Attach ActionPlayer to a GameObject, then use the Odin-powered Inspector dropdown to select and configure any concrete Action subclass. The action and its [Variable]-marked fields will be fully serialized.
Quick Lookup
Play the action
actionPlayer.Play()
Stop the action
actionPlayer.Stop()
Check if action assigned
actionPlayer.HasAction
Assign action
Configure in Inspector via Odin polymorphic serialization
Properties
HasAction
Returns true if an action has been assigned to this player.
Methods
Play
Executes the assigned action asynchronously (fire-and-forget).
Internally calls action.ExecuteAsync(). The action must not already be running.
Stop
Cancels the currently executing action.
Internally calls action.Cancel(). The action must be running.
Examples
Inspector Setup
Add
ActionPlayercomponent to a GameObjectIn the Inspector, click the Action field dropdown
Select a concrete Action type (e.g.,
WaitAction,MoveToAction,ActionSequence)Configure the action's serialized fields
Triggering from Code
Event-Driven Playback
See Also
Action — base class for all playable actions
ActionSequence — composite action for sequential execution
Last updated