Documentation

Unity Engine

Unity Engine

GetOption(int)

Retrieves a state option using its zero-based index.
Read time 1 minuteLast updated 2 months ago

Definition

public IStateOption GetOption(int index)

Parameters

index

Index of the option, based on the order in which the options were declared.

Returns

Type

Description

IStateOptionThe option at the specified index.

Remarks

The index is zero-based.
Throws ArgumentOutOfRangeException when the index is out of bounds.

Examples

var firstOption = myState.GetOption(0);