format
typescript
Animator.PlayInFixedTime(name, layer_index, fixed_time_offset)class: Animator
description
Switches the animation state to the specified animation state and plays it immediately within the specified time.
parameter
| param_name | type | description |
|---|---|---|
| name | string | The name of the specified animation state. |
| layer_index | number? | The index of the layer. |
| fixed_time_offset | number? | The time offset in seconds. |
reture
| type | description |
|---|---|
void |
code example
typescript
let obj = new GameObject();
let animator = obj.AddComponent<Animator>(Animator);
animator.Play("name",0,0);