Hey folks.
So since the Unity UI is basically based on the same 2D system I thought to use it for animating the UI Images the same way I do when animating sprites - with the Animator/Mecanim.
Now the interesting thing is that there is apparently a difference and I don’t know exactly why and it would be great if you guys could point out the mistake I made, since I strongly believe that it’s just a tiny setting-mistake.
Here’s the deal:
- I have a simple Sprite with a Sprite-Renderer and an Animator with a AnimatorController which has different AnimationClips, one of these Clips animates the Sprite-Component and cycles trough the Sprites. The very same applies to my Images which is animated. It has the UI Image Component and an Animator with the very same AnimatorController and a Clip animating the Image and cycling through the very same Images as the other Clip which animates the Sprites.
The result looks like this:
- Sprite Animation
- Image Animation
For some reason the Image-Animation “jumps” while the Sprite-Animation is completely static. And I’m not animating any position in the Image-Animation-Clip, this is just how it looks.
I already ticked “Preserve Aspect” in the Image-Component, so this is what it looks like (it looked worse without the checkbox ticked)
Any ideas what is happening?