TestAction

Concrete Action subclass used for validating and testing the variable system. Declares fields of every major supported type marked with [Variable], and completes immediately without performing any work.

Definition

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

[Serializable]
public class TestAction : Action

Inheritance: Action → TestAction

Remarks

TestAction exists as a test fixture and reference implementation. It exercises the [Variable] attribute across all commonly-used types — primitives, Unity types, custom classes, custom structs, self-referencing types (Action), and generic collections (List<string>). This ensures the variable reflection discovery system, serialization, and Inspector rendering all handle these types correctly.

Because OnExecute() returns Task.CompletedTask, this action completes synchronously in a single frame with no side effects.

Quick Lookup

Goal
How

Purpose

Validate [Variable] attribute across all field types

Execution

Completes immediately — no async work

Pattern

Synchronous action (Task.CompletedTask)

Methods

OnExecute

Returns immediately with no work performed. This confirms that the action lifecycle (begin → execute → complete → end) functions correctly for zero-duration actions.

Returns: Task.CompletedTask

Properties (Variable Fields)

All fields are marked with [Variable] and are exposed through the variable system.

Public Fields

Field
Type
Description

Bool

bool

Tests primitive boolean variable

Int

int

Tests primitive integer variable

Float

float

Tests primitive float variable

String

string

Tests string variable

Vector3

Vector3

Tests Unity struct variable

GameObject

GameObject

Tests Unity Object reference variable

Private Fields

Field
Type
Description

classData

ClassData

Tests custom class variable (nested private class)

structData

StructData

Tests custom struct variable (nested private struct)

action

Action

Tests self-referencing action variable

list

List<string>

Tests generic collection variable

Nested Types

ClassData (private class)

Test class with fields mirroring common Unity types:

Field
Type

Bool

bool

Int

int

Float

float

String

string

Vector3

Vector3

GameObject

GameObject

StructData (private struct)

Test struct with the same field layout as ClassData, used to verify variable system handling of value types vs reference types.

Examples

Using TestAction to Verify Variable Binding

See Also

Last updated