Optional
animatorThe Animator component this controller is bound to.
The data model describing the animation states and transitions.
The normalized time (0-1) to start playing the first state at. This affects the initial state when the animator is first enabled.
Gets the currently active animation state.
The active state or undefined if no state is active
Gets the engine context from the bound animator.
Gets the animation action currently playing.
The current animation action, or null if no action is playing
Gets the animation mixer used by this controller.
Binds this controller to an animator component. Creates a new animation mixer and sets up animation actions.
The animator to bind this controller to
Creates a deep copy of this controller. Clones the model data but does not copy runtime state.
A new AnimatorController instance with the same configuration
Cleans up resources used by this controller. Stops all animations and unregisters the mixer from the animation system.
Yields all animation actions managed by this controller. Iterates through all states in all layers and returns their actions.
Finds an animation state by name or hash.
The name or hash identifier of the state to find
The found state or null if not found
Gets a boolean parameter value by name or hash.
The name or hash identifier of the parameter
The boolean value of the parameter, or false if not found
Gets information about the current playing animation state.
An AnimatorStateInfo object with data about the current state, or null if no state is active
Gets a float parameter value by name or hash.
The name or hash identifier of the parameter
The float value of the parameter, or 0 if not found
Gets an integer parameter value by name or hash.
The name or hash identifier of the parameter
The integer value of the parameter, or 0 if not found
Gets the current state of a trigger parameter.
The name or hash identifier of the trigger parameter
The boolean state of the trigger, or false if not found
Checks if the controller is currently in a transition between states.
True if a transition is in progress, false otherwise
Plays an animation state by name or hash.
The name or hash identifier of the state to play
The layer index (defaults to 0)
The normalized time to start the animation from (0-1)
Transition duration in seconds
Resets the controller to its initial state.
Resets a trigger parameter to inactive (false).
The name or hash identifier of the trigger parameter
Sets a boolean parameter value by name or hash.
The name or hash identifier of the parameter
The boolean value to set
Sets a float parameter value by name or hash.
The name or hash identifier of the parameter
The float value to set
True if the parameter was found and set, false otherwise
Sets an integer parameter value by name or hash.
The name or hash identifier of the parameter
The integer value to set
Set the speed of the animator controller. Larger values will make the animation play faster.
Sets a trigger parameter to active (true). Trigger parameters are automatically reset after they are consumed by a transition.
The name or hash identifier of the trigger parameter
Updates the controller's state machine and animations. Called each frame by the animator component.
The weight to apply to the animations (for blending)
Static
createCreates an AnimatorController from a set of animation clips. Each clip becomes a state in the controller's state machine.
The animation clips to use for creating states
Configuration options for the controller including looping behavior and transitions
A new AnimatorController instance
Controls the playback of animations using a state machine architecture.
The AnimatorController manages animation states, transitions between states, and parameters that affect those transitions. It is used by the Animator component to control animation behavior on 3D models.
Use the static method AnimatorController.createFromClips to create an animator controller from a set of animation clips.