Skip to main content

Animator

Interfaces with the Mecanim animation system.

To get an Animator from an item, use the GetComponent method.

let animatorComponent = item.GetComponent("Animator")

You can then use the animatorComponent property to access the Dropdown class.

Methods

Method NameReturn TypeParametersDescription
IsValidvoidnoneChecks if the component is not null
IsStateNameboolint, stringChecks if the name matches the name of the active state in the statemachine
IsStateTagboolint, stringChecks if the tag matches the tag of the active state in the statemachine
GetBoolboolstringGets the value of the bool parameter by name
GetFloatfloatstringGets the value of the float parameter by name
GetIntintstringGets the value of the int parameter by name
SetBoolvoidstring, boolSets the value of the bool parameter by name
SetFloatvoidstring, floatSets the value of the float parameter by name
SetIntvoidstring, floatSets the value of the int parameter by name
SetTriggervoidstringSets the value of the trigger parameter by name

Properties

Property NameTypeDescription
EnabledboolChecks the active state of the component