Home Unity

[Unity] Can't Get Sprite Animation To Play Using Tutorial

polycounter lvl 3
Offline / Send Message
poly_troubleshoot polycounter lvl 3
I am using Unity. I am following a Unity tutorial. I can't get the Character animation to play in the game view. The sprite renderer and the Animator were added to the Inspector. I can even see it play in the scene view. This means the animation itself is working. Why isn't the animation playing in the scene view when I hit play? This is literally the first 2 minutes of the tutorial and I'm already stuck. WHY? Did I not import it right or something? What can I check?

I am using this tutorial: https://unity3d.com/learn/tutorials/projects/2d-roguelike-tutorial/player-and-enemy-animations?playlist=17150

Replies

  • RyanB
    Options
    Offline / Send Message
    Go to Window->Animation with Player selected.  You should see a sequence of sprites for each frame.  I suspect you just dragged the first frame into the game window and made an animation with only a single frame.  What you should do is shift-select all of the frames and drag those into the game window. 
    You can also drag sprites into the animation window if they are missing.
  • poly_troubleshoot
    Options
    Offline / Send Message
    poly_troubleshoot polycounter lvl 3
    I'm sorry but your solution did not work. I went to Window->Animation and it gave me three options. None of which appear to solve the issue. As far as shift selecting the frames, I did that the way the tutorial described. I did not shift-select and drag into the game window but rather the player prefab/ When I attempt to drag the prefab into the scene window I get a no entry symbol on my cursor. I also receive the no-entry symbol when I drag the frames themselves into the scene as you described.
  • poly_troubleshoot
    Options
    Offline / Send Message
    poly_troubleshoot polycounter lvl 3
    Figured it out. Near clipping is non zero and the prefab was created with a default value of -9 for some reason. Had to change the player prefab z-dimension to 0.
Sign In or Register to comment.