I have an animation type (let's say animation type ID 40) and I want to play it in a script. I thought it would be adding a this.combatant.Animations.play(40) in buttonplayercontroller, but I had some exceptions.
Can you post the error/exception you get? Generally, that's the way to do it, i.e. just call the Play function with the ID of the animation type you want to play: combatant.Animations.Play(typeID);
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I see what I did. this.combatant = wasn't set yet, so I changed the order in my version ofButtonPlayer extended.
so I have another question!
Is there a way to pause a legacy animation? I.E I'm extending the buttonplayer script to incorporate a climbing mechanism, and it goes right back to idle when I stop the idle button but I want to try and get it to pause the animation (so I can resume when I climb again)
You can just play animations via the Animation component of Unity. Pausing would be setting the speed of an animation (state) to 0.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Generally, that's the way to do it, i.e. just call the Play function with the ID of the animation type you want to play:
combatant.Animations.Play(typeID);
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
so I have another question!
Is there a way to pause a legacy animation? I.E I'm extending the buttonplayer script to incorporate a climbing mechanism, and it goes right back to idle when I stop the idle button but I want to try and get it to pause the animation (so I can resume when I climb again)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!