Search Unity

Bug with "Animation" and sprites vs "scaling"

Discussion in '2D' started by Plott, Jul 31, 2014.

  1. Plott

    Plott

    Joined:
    May 12, 2014
    Posts:
    94
    I guess the tab is called "Animation" not the animator.

    So here is my scenario.

    i have a button and a sprite animation. Once you "click" the sprites play through and trigger the next scene. Its a piece of cake and it works great.

    Problem.
    I tried to cheat one button that didnt have sprites yet by going in the "animation" tab and scaling 5 frames in. it played through fine in the preview, but once I went to activate trigger to start the transition it just runs in Idle.

    Thinking i was dumb i tried it 5 different times with similar buttons that have similar scripts in my project, no luck. I went in and used a sprite sequence and it works....

    Any idea what Im doing wrong? or is it a bug? Do you have to have a sprite on every frame? I only had two but 4 frames seperated

    (most likely me being stupid)

    thanks!
     
  2. Punchbag

    Punchbag

    Joined:
    Oct 30, 2012
    Posts:
    48
    What are you scaling from/to? If you're scaling the whole object, then don't forget you're scaling the collider that you click too.