How to do it...

To create and assign an Animator Controller, follow these steps:

  1. Navigate to the Project View (any directory in the Assets folder) and press  the right mouse button.
  2. Choose CreateAnimator Controller from the menu. A controller asset will be created. You can name it as you wish.
  3. Double-click on the created controller. An Animator tab will appear. It will show the current selected Animator Controller.
  1. Here you can add the first animation. Navigate to your imported character in the Project View. Unfold it and drag and drop one of the imported animations into the Animator window. A new state will be created and will be colored orange, showing that this is the default animation statethe state from which your graph starts.
  1. Navigate to your character on the scene and select it.
  2. Find the Animator component in the Inspector tab. All animated objects have an Animator component added automatically.
  3. Find the Controller slot in the Animator component inspector.
  4. Drag and drop your Animator Controller asset into the Controller slot of the Animator component.
  5. Run the game to see your character play the default state animation of your Animator Controller. If the animation is not looped, it will be played just once and then the character will freeze.
  6. You can also select your character in runtime and navigate to the Animator tab to see what animation state the character is currently in. Current animation state will have a blue progress bar displayed.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.19.243