Skip to content

format

typescript
Animator.GetNextStateInfo(layer_index)

class: Animator

description

Gets the animation state information of the next state within the specified layer and stores it in the target animation state information object.

parameter

param_nametypedescription
layer_indexnumberThe index of the layer.

reture

typedescription
AnimatorStateInfoAn object used to store the animation state information.

code example

typescript
let obj = new GameObject();
let animator = obj.AddComponent<Animator>(Animator);
animator.GetNextStateInfo(undefined);