Skip to content

format

typescript
Animation.GetClip(name)

class: Animation

description

Get a single animation clip.

parameter

param_nametypedescription
namestringThe name of the specified animation clip.

reture

typedescription
AnimationClipThe animation clip.

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.GetClip("newClip");