Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

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

IAnimatorControllerPlayable.HasState

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

Parameters

layerIndex The layer's index.
stateID The AnimatorState fullPathHash, nameHash or shortNameHash.

Description

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