format
typescript
Animation.Blend(name, weight, normalized_duration, mode)class: Animation
description
Blends the current animation with the animation named "name". Other animations are not affected.
parameter
| param_name | type | description |
|---|---|---|
| name | string | The name of the animation to blend with. |
| weight | number | The weight of the target animation. |
| normalized_duration | number | The duration of the blend transition. |
| mode | AnimationPlayMode | The play mode. |
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.Blend(clip.name, Math.random(), Math.random(), AnimationPlayMode.StopAll);