ActionSystem

The Action System provides an async-based command pattern for defining, executing, and sequencing discrete units of gameplay logic. Actions are serializable, support cancellation, and expose a variable binding system for data-driven parameterization.

Architecture

spinner

Data Flow

spinner

Key Concepts

Concept
Description

Action

Abstract base class for a single unit of async work. Subclass and override OnExecute().

ActionSequence

Concrete Action that runs a list of child Actions in order.

ActionPlayer

MonoBehaviour that holds and plays a single Action from the Inspector.

IAction

Minimal interface for completing, cancelling, and accessing variables.

ActionVariables

Internal variable system supporting field-based and dynamic variables.

Execution Lifecycle

spinner

Quick Start

Creating a Custom Action

Running an Action

Building a Sequence

An ActionSequence is itself an Action, so sequences can be nested:

Classes

Class
Description

Interface defining the action contract

Abstract base class for all actions

MonoBehaviour wrapper for Inspector-driven action playback

Composite action that runs children sequentially

Last updated