ActionVariables

Container that manages all variables for an action.

Definition

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

[Serializable]
public class ActionVariables : ISerializationCallbackReceiver

Implements: ISerializationCallbackReceiver

Remarks

ActionVariables supports two types of variables:

  • Field Variables — Discovered via [Variable] attribute on action fields

  • Dynamic Variables — Created at runtime via AddVariable()

Constructor

public ActionVariables(Action action)
Parameter
Type
Description

action

The action that owns these variables

Properties

FieldVariableCount

Gets the number of field variables.

DynamicVariableCount

Gets the number of dynamic variables.

Methods

AddVariable()

Creates a dynamic variable at runtime.


RemoveVariable()

Removes a dynamic variable.

Returns: true if removed successfully


SetVariableValue()

Sets any variable's value.


GetVariableValue<TValue>()

Gets a variable's typed value.


HasVariable()

Checks if a variable exists.


ApplyFieldVariables()

Applies referenced values to field variables.


GetAllVariables()

Gets all variables (field + dynamic).


GetAllVariablesOfType()

Gets variables of a specific type.

See Also

Last updated

Was this helpful?