IAction

Minimal interface for interacting with an action. Provides methods to complete, cancel, and access variables by name.

Definition

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

public interface IAction

Remarks

IAction is the primary contract for external code interacting with actions. It intentionally omits execution methods (Execute, ExecuteAsync) to allow consumers to interact with running actions without being able to restart them.

The variable system supports two kinds of variables:

  • Field variables — fields on the Action subclass marked with [Variable], discovered via reflection.

  • Dynamic variables — added at runtime via ActionVariables.AddVariable().

Quick Lookup

Goal
How

Complete an action

action.Complete()

Cancel an action

action.Cancel()

Set a variable

action.SetVariable<float>("speed", 5f)

Get a variable

var speed = action.GetVariable<float>("speed")

Methods

Complete

Signals the action to complete successfully.

Cancel

Signals the action to cancel execution.

SetVariable<T>

Sets a named variable on the action.

Parameter
Type
Description

name

string

Variable name

value

T

Value to assign

GetVariable<T>

Gets a named variable from the action.

Parameter
Type
Description

name

string

Variable name

Returns: The variable value cast to T.

See Also

  • Action — abstract base class implementing this interface

  • ActionPlayer — MonoBehaviour that plays actions

Last updated