Skip to content

format

typescript
Animation.SyncLayer(layer)

class: Animation

description

Synchronizes the animation states in the specified layer.

This method is used to synchronize the animation states in the specified layer with the animation states in another layer, so that the animation states in both layers can be played at the same time, achieving coordinated control of the animations.

parameter

param_nametypedescription
layernumberThe specified layer.

reture

typedescription
void

code example

typescript
let obj = new GameObject();
let animation = obj.AddComponent<Animation>(Animation);
animation.SyncLayer(1);