I have an animation controller class that I made, for a character that runs around and jumps. All of that works fine. I decided to add a sword slash. I put in the animation, then put in this code in the start function of the animation controller script.
var oneHandSwordAnim = animation["up_sword_action"];
oneHandSwordAnim.wrapMode = WrapMode.Once;
oneHandSwordAnim.layer = 3;
I would think that would set the wrapmode for the animation for any further time I felt like using it. But in the update when I play that animation, it loops anyway. I looked in the debugger and the wrapmode was set back to loop. Is there anything that can change the wrapmode on animations like that out from under you? I use a similar technique in the jump animation and it works fine.
Thanks!