format
typescript
Animation.PlayQueued(name, queue_mode, mode)class: Animation
description
Add an animation clip named 'name' to the animation play list and play it after the current animation clip finishes playing.
It allows you to automatically play the next animation after the current animation finishes, achieving seamless animation transitions.
parameter
| param_name | type | description |
|---|---|---|
| name | string | The name of the animation clip. |
| queue_mode | AnimationQueueMode | The queue play mode that defines the behavior of the animation queue. The default value is AnimationQueueMode.CompleteOthers. |
| mode | AnimationPlayMode | The animation play mode that defines the overlay behavior of the animation. The default value is AnimationPlayMode.StopSameLayer. |
reture
| type | description |
|---|---|
void |
code example
typescript
let obj = new GameObject();
let animation = obj.AddComponent<Animation>(Animation);
animation.PlayQueued("clip_name", AnimationQueueMode.PlayNow, AnimationPlayMode.StopAll);