format
typescript
Animator.GetFloat(name)class: Animator
description
Get the current value of the float type parameter with the specified parameter name.
parameter
| param_name | type | description |
|---|---|---|
| name | string | The name of the parameter. |
reture
| type | description |
|---|---|
number|undefined | Whether the current value of the parameter is obtained (returns false when the parameter name is empty or the parameter type is inconsistent). |
code example
typescript
let obj = new GameObject();
let animator = obj.AddComponent<Animator>(Animator);
animator.GetFloat("float0");