Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetVariables

Retrieves all variables declared in the state machine.
Read time 1 minuteLast updated 7 days ago

Definition

GetVariables()

Retrieves all variables declared in the state machine.
public IEnumerable<IVariable> GetVariables()

Returns

Type

Description

IEnumerable<IVariable>An
IEnumerable
of all IVariables declared in the state machine.

Remarks

The collection reflects the variables as declared, in their order of creation. To get the variables in a specific order, use StateMachine.GetVariables.

GetVariables(SortMethod)

Retrieves all variables declared in the state machine in a specific order using SortMethod.
public IEnumerable<IVariable> GetVariables(SortMethod sort)

Parameters

The sorting method.

Returns

Type

Description

IEnumerable<IVariable>An
IEnumerable
of all IVariables declared in the state machine, ordered using the provided SortMethod.

Remarks