Hello!
This one is probably easy but I am not sure how to frame the question so I’m not finding the answer. Basically, I am trying to make animation poses advance forward one frame or reverse back one frame depending on which button is touched. I have forward down easy, basically it’s state++; if (state == 1){ animation.Play("1"); } if (state == 2){ animation.CrossFade("2"); copy pasta copy pasta.
Now, how do I create a state-- if you will? I thought that would work but Unity just whistles and smirks at me. I’ve tried ±1 but this gets me that expressions error. I’ve tried looking it up but haven’t gotten very far. A little nudge in the right direction would be most helpful! Thanks!
Take a look at the animation's play speed property, maybe you could set it to -1/1 for a single frame and back to 0? http://unity3d.com/support/documentation/ScriptReference/AnimationState-speed.html
– asafsitner