Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

cant get sprite to go from idle to animation

Discussion in '2D' started by ollie_floren, Mar 29, 2020.

  1. ollie_floren

    ollie_floren

    Joined:
    Mar 28, 2020
    Posts:
    2
    upload_2020-3-28_23-59-47.png
    upload_2020-3-29_0-0-36.png

    been getting these errors and i followed the video tutorial to the t yet i still cant figure out why especially since this is my first attempt.
    any help would be appreciated :)
     

    Attached Files:

  2. Primoz56

    Primoz56

    Joined:
    May 9, 2018
    Posts:
    369
    Images are super blurry so I can't really tell whats the issue. I would be guessing you didn't actually set up the animation. In the bottom section under animation make sure that there is an animation created (you can click the play button near it to preview the animation). But otherwise you will need this, confirm you have it all:

    1. An animator with animations, variables and transitions (think you're good here)
    2. Animations for each animator state, correctly assigned (click on the states and in inspector you should see em)
    3. Correctly assigned transitions, in run mode you can preview what is currently playing and if it's not moving along it would be due to bad transitions likely. Note that the actual variable values do not update/show in the run/preview mode so don't assume they're wrong or that you can change them that way.
    4. A way to trigger the transition - usually some code that goes animator.SetBool("NameOfBool", true);