- Home /
Animation doesn't begin with first image in sequence
Wordy title, but I'm having an issue with creating animations out of image sequences. I have the separate PNG files numerically ordered, but when I drag them into the scene/hierarchy, SOMETIMES the animations begin with, say, the 6th image instead of the first. (Not always, but 9/10 times.)
Here is a screenshot of my image sequence, numerically ordered:
And this is what the Inspector bar for the animation looks like after I've highlighted the images and dragged them into the Hierarchy:
Starts with 302 instead of 300. And there's no change if I replace the sprite with the correct image. So it's weird.
Any help is appreciated! Thanks.
Answer by jabennett · Feb 12, 2017 at 05:40 PM
I noticed that your controller is labeled "igor scene 302", does this mean that you only have that one animation in the controller? If so, that would explain why your sprite isn't starting with "igor scene 300", and why you wouldn't be able to change it at run-time. You would want all of your related animations on the same controller in Mecanim.
I went back and figured out the issue (still don't know how to fix, but I have a clearer idea of the problem). The sprite renderer is going through the animation during gameplay, which gave me the impression that it was starting in the middle. I want the sprite renderer to start at the beginning of the animation when clicked.
^that's the sprite renderer that changes continuously.