format
typescript
Animation.Rewind(name)class: Animation
description
Rewinds the animation clip named "name" to its starting frame.
parameter
| param_name | type | description |
|---|---|---|
| name | string | The name of the animation clip. |
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.Rewind("newClip");