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_name | type | description |
|---|---|---|
| layer_index | number | The index of the layer. |
reture
| type | description |
|---|---|
AnimatorStateInfo | An object used to store the animation state information. |
code example
typescript
let obj = new GameObject();
let animator = obj.AddComponent<Animator>(Animator);
animator.GetNextStateInfo(undefined);