Skip to content

Api > Animator > HasState()


Animator.HasState(number layerIndex, number stateID)⚓︎

Returns true if the state exists in this layer, false otherwise.

Parameters:⚓︎

Name Type Description
layerIndex number The layer index.
stateID number The state ID.

Returns:⚓︎

type Description
boolean True if the state exists in this layer, false otherwise.

Usage⚓︎

---@type Animator
local animator;

---@type number
local layerIndex;

---@type number
local stateID;


local val0 = animator.HasState(layerIndex, stateID)