When creating the mechanim animation, there was no animator component added to the cube. So I went ahead and added one, cr...

When creating the mechanim animation, there was no animator component added to the cube. So I went ahead and added one, created a CubeController and drag dropped the 2 animations into the controller. I press play and it shows in animator tab that its playing but its not modifying the cube rotation. :(
  • Jonathan Gonzalez(jgonzalez) replied
    Usually the Animator component gets added by default when you first start creating an animation and a Animator Controller gets created as well but these can be created manually. When they are created automatically it'll assign the Animator Controller to the Animator component. You probably forgot to add the Animator Controller to the Animator component.
  • Joseph Cotter(joseph-cotter) replied

    I'm having the same problem, same situation, however the controller field is set to 'cube' (was added by dragging the cube animator onto the cube object inspector panel.) So that isn't the problem.

  • Joseph Cotter(joseph-cotter) replied

    I started the exercise over from the start and got it working. It appears that if we create an animation in the Animation timeline with an 'Animation' component, then delete the component and add an Animator component the wiring doesn't get wired properly. The animations did show in the mechanim window and all of the fields appeared to be set properly but obviously something wasn't connecting. I'm sure there is something that would reveal itself once we get more familiar with the intricacies of setting up animations but in the meantime it appears the easy answer is that if we have an animation component and are switching to an animator component, don't record the animation till after deleting the animation and adding the animator, or plan on re-recording the animation after the switch.

  • Joseph Cotter(joseph-cotter) replied

    Btw, as mentioned... the bars show activity in the mechanim window but for some reason the animations weren't effecting the actual object, which upon thinking suggests some error in the script itself... can't double check unfortunately as I deleted the previous exercise.

  • Joseph Cotter(joseph-cotter) replied

    I remember why I was thinking things weren't wired properly when switching from Animation to Animator... The area in Settings which showed the clips was empty and there was an error message that there was no action associated. I played with this, trying to fix it and couldn't. I'm guessing that at this point I could have deleted the animations and recreated them from scratch and this might have fixed it, or, there might have been another way to get this fixed that I wasn't able to find, but it seems this was at the heart of the problem. 


  • Jonathan Gonzalez(jgonzalez) replied

    Are you using Unity 2017? I just tested this myself to see if anything was off. Here are the steps I followed:

    • Select Cube and open the Animation Window
    • Click "Create" from Animation Window to create an Animator and Animation Clip
    • Animate Cube while recording then stop recording when done
    • Go to Game Window and press play, default animation should play
    When you create the animation clip and Animator from the animation window it shouldn't add an animation component as that is fairly outdated now. The Animator gets added and an Animator Controller is created and assigned to the Animator. When you create an animation it automatically gets added to the Animator Controller, and since it's the first animation it will play by default on the cube. 

    Try this with one animation, once that works try it with a second animation. If you'd like to go more in-depth with Mecanim animation in Unity I'd recommend this course to get started: https://cgcookie.com/course/fundamentals-of-mecanim-animation