Skip to content

格式

typescript
Animation.clipCount

所属类: Animation

描述

当前分配给此动画的剪辑数。

通过使用此方法,您可以在运行时了解当前Animation组件中注册的动画剪辑数量。这对于动态管理和控制动画剪辑非常有用。

参数

参数名类型描述

返回值

类型描述
number动画剪辑数量

代码示例

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