format
typescript
AnimatorStateInfo.isValidclass: AnimatorStateInfo
description
(Read Only) Whether the current state is valid.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
boolean |
code example
typeScript
let go = new GameObject("StateInfo");
let animator = go.AddComponent<Animator>(Animator);
let data = Resources.Load<AnimatorData>(AnimatorData, "461E6F10246D4A0638921370728F3D10");
let stateInfo = actor.GetCurrentStateInfo(0);
stateInfo.IsValid;