🧰
Developer
  • ENGAGE SDK overview
  • Setting up the ENGAGE SDK
    • Registering as an ENGAGE developer
    • Setting up your local git repository
    • Installing the Unity Editor
    • Opening the ENGAGE SDK Unity project
    • Checking for SDK updates
    • Installing a platform build module
  • ENGAGE SDK project folders
  • General guidelines for 3D models
    • Optimizing 3D models
  • Locations
    • Guidelines for locations
    • Creating a new location
    • Building a location bundle
    • Testing a location locally on Windows
    • Configuring an object as a teleport target
    • Configuring the start position
    • Seats
      • Creating a seat
      • Using the summon to seat system
    • Network states
      • Network State Manager
      • Location Network States
      • Example network state configurations
        • Network state toggle object
        • Network state animation start/stop
        • Network state change animation
          • Creating an animation in Unity
          • Using Animator.Play(string)
          • Defining Animator transitions
          • Using Animator.SetTrigger(string)
        • Network state sync animation
        • Network state position toggle
        • Network state automatic door
        • Network state toggle skybox
        • Network state change materials
    • Adding grabable objects to a location
      • Resetting network objects with a button
      • Resetting network objects when out of bounds
    • Locations reference information
      • Basic requirements for a location
  • Immersive Effects (IFX)
    • Guidelines for IFX
    • Creating an IFX
    • Building an IFX bundle
    • Testing IFX locally on Windows
    • Specialized IFX
      • Animated IFX
        • Animation overrides
          • Legacy animations
          • Animator animations
          • Configuring additional Effect Life Run Control properties
      • Audio IFX
      • Interactive IFX
  • List of available prefabs
  • Available scripts
    • External Video Player
  • Profiling
  • Publishing to ENGAGE
    • Publishing checklists
    • Pushing files to your GitHub repository
  • AFX
    • Getting started
      • Changelog
    • AFX Graphs
      • Creating an AFX graph
      • Editing an AFX graph
      • Navigation and keyboard shortcuts
      • Adding an AFX graph to a game object
      • Nodes
      • Ports
      • Connections
      • Flows
        • Starting a flow
        • Using multiple flows
        • Chaining flows
        • Controlling flows
      • References
      • Using AFX Events
    • Networking AFX
      • Network State Modules
      • Ownership of networked objects
    • Animation curves
    • Node dictionary
      • ENGAGE
        • AFX Companion
          • Constant Collision
          • Grab Object
          • PathData
        • Networking
          • Network State Modules
        • Physics
        • Player
        • Seat
      • Events
        • Collision
        • Unity
        • AFX Events
      • Flow
      • Reference
      • Unity
        • Component
          • Animation
            • Set Parameters
          • Audio
            • Audio Reverb Zone
            • Audio Source
          • Collider
          • FX
          • Rendering
            • Camera
            • Light
            • Material
          • UI
        • Constraint
        • GameObject
        • Input
        • Physics
          • Raycast
            • Layer Mask
          • RigidBody
            • Joint
              • Hinge
              • Spring
          • Wheel Collider
        • Time
        • Transform
          • Get
          • Set
          • Space Switching
      • Variable
        • Bool
        • Comparison
        • Float
        • Int
        • List
        • Math
          • MathF
        • String
        • Unity Component
        • Vector
          • Quaternion
          • Vector2
          • Vector 3
            • Vector3 Math
    • Sample graphs
Powered by GitBook
On this page
  • Creating a transition
  • Adding transition triggers
  • Testing transition triggers
  1. Locations
  2. Network states
  3. Example network state configurations
  4. Network state change animation

Defining Animator transitions

PreviousUsing Animator.Play(string)NextUsing Animator.SetTrigger(string)

Last updated 7 months ago

You can use the Animator controller to control how an object transitions between different animation clips. This requires an Animator component on the object for which you want to control animations. When you use the Animation Window to add animations to an object in Unity, an Animator component is added automatically. For more detailed information, refer to the page in the Unity documentation.

Creating a transition

A transition defines when the Animator should change from one animation clip to another. To add a transition, complete the following steps:

  1. In the Hierarchy panel, select the object that you want to define transitions for.

  2. From the Window menu, select Animation > Animator.

  3. Optional: To set the default state, right-click an animation, and then select Set as Layer Default State from the menu that appears.

  4. Complete the following steps for each transition that you want to create:

    1. Right-click the animation that you want to transition from, and then select Make Transition from the menu that appears.

    2. Select the animation that you want to transition to.

When the Animator plays an animation clip that has a transition, it will automatically follow that transition after the animation clip finishes playing. If you want to control when the Animator will follow a transition, one option is to use triggers. See the following section for more information.

Adding transition triggers

If you add a trigger to a transition, the Animator will follow the transition only when the trigger has been activated. After a trigger has caused a transition to be followed, the trigger is reset.

To create a trigger and apply it to a transition, complete the following steps:

  1. In the Animator, select the Parameters tab.

  2. From the plus menu, select Trigger.

  1. Enter a name for the trigger.

  2. In the Animator canvas, select the transition that you want to trigger.

  3. In the Inspector panel, in the Conditions list, select the plus symbol.

  4. From the list that is added, select the trigger that you want to activate the transition.

Testing transition triggers

When Unity is in play mode, you can access the Animator panel, and then select triggers to test the transitions.

Animation Controller
Right-click menu to make a transition
Adding a transition trigger
Selected transition and Conditions list
Example test of transition triggers in an animation