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_name | type | description |
|---|---|---|
| layer | number | The specified layer. |
reture
| type | description |
|---|---|
void |
code example
typescript
let obj = new GameObject();
let animation = obj.AddComponent<Animation>(Animation);
animation.SyncLayer(1);