format
typescript
Animation.clipCountclass: Animation
description
The number of clips currently assigned to this animation.
By using this method, you can determine the number of animation clips registered in the current Animation component at runtime. This is useful for dynamically managing and controlling animation clips.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
number | The number of animation clips |
code example
typescript
let animation = this.gameObject.GetComponent<Animation>(Animation);
let clip = animation.clipCount;