Skip to content

format

typescript
Animation.Sample()

class: Animation

description

Samples the animation clip in the current state.

parameter

param_nametypedescription

reture

typedescription
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.Sample();