Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Animator.HasState

Switch to Manual
public function HasState(layerIndex: int, stateID: int): bool;

Parameters

layerIndexThe layer's index.
stateIDThe AnimatorState fullPathHash, nameHash or shortNameHash.

Returns

bool The State is found.

Description

Returns true if the AnimatorState is present in the Animator's controller.