- Home /
Question by
bizzarre · Feb 20, 2014 at 06:03 PM ·
animation2dspritesheetframe
How can I access a spritesheet's current frame within a script?
I'm working on a 2D game and right now I'm trying to create an explosion effect. Spritesheet animations seem to loop through their animation constantly, so I'm trying to solve this problem by adding a script to my explosion GameObject, which is meant to check if the animation has finished (e.g. because the last frame is visible) and if so, hide the animation.
Unfortunately I haven't found any kind of solution to find out which frame is currently being played by an animation, even after 2 hours of searching the internet, reading the documentation and asking for help in the IRC chat, so any help would be greatly appreciated...
Comment