Skip to content

format

typescript
Animation.clipCount

class: 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_nametypedescription

reture

typedescription
numberThe number of animation clips

code example

typescript
let animation = this.gameObject.GetComponent<Animation>(Animation);
let clip = animation.clipCount;