Skip to content

format

typescript
Animator.GetFloat(name)

class: Animator

description

Get the current value of the float type parameter with the specified parameter name.

parameter

param_nametypedescription
namestringThe name of the parameter.

reture

typedescription
number|undefinedWhether 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");