- Home /
Unity 2D (4.3) Controlling Sprite Playback Code
Hi guys first question so apologies if I don't post anything correctly.
Basically what I want to do is control the playback of my sprite. I am moving a project from flash to unity and where in flash you had the timeline with keyframes (similar to the new dope sheet feature added in 4.3) you could also use code to tell the sprite gotoFrame(whatever). Is there any similar feature within Unity to control playback of a sprite that specifically ?
I have a sprite that has 6 different stages of damage and basically I want it to change frames each time it is hit to represent the new stage of damage. At the moment I have made the sprite animation hosting all the different stages of damage and just have playback set to 0 while I fix this problem. Perhaps I am going about this the one way and someone else could suggest a better alternative to the way I am doing it. Another way I thought about which I also don't know if it will work is replacing the sprite image with another sprite.
Thanks guys (PS I am using Javascript)
Your answer

Follow this Question
Related Questions
how to move child object inside a moving parent in 2d using Vector2.MoveTowards()? 1 Answer
How can i create multiplayer game using wifi hotspot in unity 0 Answers
Game for 2 players using 2 android devices 0 Answers
GDPR unity and Admob ads 0 Answers
LoadSceneAsync makes unity behave differently after build. 0 Answers