Skip to main content

Animator.PlayInFixedTime(string stateName, number layer = -1, number fixedTime = -#INF)

Plays a state.

Parameters:

NameTypeDescription
stateNamestringThe state name.
layernumberThe layer index. If layer is -1, it plays the first state with the given state name or hash.
fixedTimenumberThe time offset (in seconds).

Usage

---@type Animator
local animator;

---@type string
local stateName;

---@type number
local layer;

---@type number
local fixedTime;


animator.PlayInFixedTime(stateName, layer, fixedTime)

Extra Detail

When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a Run state in the Base Layer, the name is Base Layer.Run.