Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

Animator.GetCurrentAnimatorStateInfo

Switch to Manual
GetCurrentAnimatorStateInfo(layerIndex: int): AnimatorStateInfo;
AnimatorStateInfo GetCurrentAnimatorStateInfo(int layerIndex);
def GetCurrentAnimatorStateInfo(layerIndex as int) as AnimatorStateInfo

Parameters

layerIndexThe layer's index.

Description

Gets the current State information on a specified AnimatorController layer.