Mecanim Animation Bridge - 2D

The Mecanim 2D animation bridge simple plays 2D animations when animation state changes.

It supports:

  • Directly Playing animations without transitions.
  • Simple animation priority (higher priority animations must play to completion before lower priority animations play)
  • Animator Overrides

 Warning: The Mecanim 2D animation bridge requires all states supported by your character have matching states in the Mecanim Animator (animation state tree). These names must be an exact upper-case match with the state name.

 

 

Quick Start 

This quick start assumes you have a character, and have already created animations for your sprite.

  1. Create an Empty GameObject that is a child of your Character. Name it CharacterSprite or something else meaningful.
  2. Drag your characters Idle animation to the newly created GameObject.
  3. Select the prefab Template-Mecanim2D-AnimationController and duplicate it. Rename this duplicate something meaningful.
  4. Assign this newly created prefab to the Animation Controller property of the Animator component of your newly created sprite GameObject.
  5. Open the Animation view.
  6. Drag your characters sprite animations to each matching animation state.

You should now have an animated character.

 

Required Components

 In order for the Mecanim 2D bridge to animate it requires:

  • An Animator component.
  • A SpriteRenderer or MeshRenderer or SkinnedMeshRenderer (and associated components).

 

Configuration

The Mecanim 2D animation bridge relies on an Animation Controller with animation state names being the same the AnimationState enum. This means the state name should be an exact match with capital letters, for example: WALK or AIRBORNE.

Have more questions? Submit a request

2 Comments

Please sign in to leave a comment.
Powered by Zendesk