format
typescript
Animator.CrossFadeInFixedTime(name, normalized_transition_duration, layer_index, fixed_time_offset, fixed_transition_time)class: Animator
description
Transitions from the current animation state to the target animation state within a specified time.
parameter
| param_name | type | description |
|---|---|---|
| name | string | The name of the target animation state. |
| normalized_transition_duration | number | The duration of the transition, normalized to the animation length. |
| layer_index | number? | The index of the layer. |
| fixed_time_offset | number? | The offset time of the state. |
| fixed_transition_time | number? | The transition time. |
reture
| type | description |
|---|---|
void | None |
code example
typescript
let obj = new GameObject();
let animator = obj.AddComponent<Animator>(Animator);
animator.CrossFadeInFixedTime("name", 1, 1, 1, 1);