DynamicVariable

Sealed internal Variable implementation that stores its value in an internal object field. Used for variables created at runtime via ActionVariables.AddVariable() rather than discovered from reflection.

Definition

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

[Serializable]
internal sealed class DynamicVariable : Variable

Inheritance: Variable → DynamicVariable

Remarks

DynamicVariable is the simplest storage backend. It holds a single object field serialized via Odin, making it suitable for any serializable type. Unlike FieldVariable, it does not require an owner object or reflection — it is fully self-contained.

Dynamic variables are:

Constructor

DynamicVariable(Type, string, object)

Creates a new dynamic variable with the given type, name, and optional initial value.

Parameter
Type
Description

type

Type

The value type

name

string

The variable name

value

object

Optional initial value (defaults to default)

Methods

SetValue

Stores the value in the internal field.

Parameter
Type
Description

value

object

The value to store

GetValue

Returns the internally stored value.

Returns: The stored value as object.

See Also

Last updated