format
typescript
Animator.SetInteger(name, value)class: Animator
description
Sets the current value of the integer type parameter with the specified parameter name.
parameter
| param_name | type | description |
|---|---|---|
| name | string | The name of the parameter. |
| value | number | The value of the parameter. |
reture
| type | description |
|---|---|
boolean|undefined | Returns true if the parameter is set successfully. Returns false if 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.SetInteger("int0",0);