format
typescript
Animation.RemoveClip(clip)class: Animation
description
Remove the specified animation clip.
By calling this method, you can remove an animation clip that is no longer needed from the animation component.
parameter
| param_name | type | description |
|---|---|---|
| clip | AnimationClip | The animation clip to remove. |
reture
| type | description |
|---|---|
void |
code example
typescript
let obj = new GameObject();
let animation = obj.AddComponent<Animation>(Animation);
let uuid = "31A9092E126B4B19BBFD9D5FCD75AA49";
let clip = Resources.Load<AnimationClip>(AnimationClip, uuid);
animation.AddClip(clip,"newClip");
animation.RemoveClip(clip);