The Anim Component Layer allows managers a single layer of the animation state graph.


_blendTime: number = 0
_blendTimeElapsed: number = 0
_blendType: string
_component: AnimComponent
_controller: AnimController
_mask: any = null
_name: string
_startingWeight: number = 0
_targetWeight: number = 0
_weight: number



  • Assigns an animation track to a state or blend tree node in the current graph. If a state for the given nodePath doesn't exist, it will be created. If all states nodes are linked and the AnimComponent#activate value was set to true then the component will begin playing.


    • nodePath: string

      Either the state name or the path to a blend tree node that this animation should be associated with. Each section of a blend tree path is split using a period (.) therefore state names should not include this character (e.g "MyStateName" or "MyStateName.BlendTreeNode").

    • animTrack: AnimTrack

      The animation track that will be assigned to this state and played whenever this state is active.

    • Optional speed: number

      Update the speed of the state you are assigning an animation to. Defaults to 1.

    • Optional loop: boolean

      Update the loop property of the state you are assigning an animation to. Defaults to true.

    Returns void

  • Blend from the current weight value to the provided weight value over a given amount of time.


    • weight: number

      The new weight value to blend to.

    • time: number

      The duration of the blend in seconds.

    Returns void

  • Transition to any state in the current layers graph. Transitions can be instant or take an optional blend time.


    • to: string

      The state that this transition will transition to.

    • Optional time: number = 0

      The duration of the transition in seconds. Defaults to 0.

    • Optional transitionOffset: number = null

      If provided, the destination state will begin playing its animation at this time. Given in normalized time, based on the states duration & must be between 0 and 1. Defaults to null.

    Returns void