I’m just curious to see if there is another way to get the length of an animation I want to play. I’m using mechanim and going from an idle state animation to an attack animation. I don’t want the player to be able to do any inputs or new animation triggers or anything.
Right now I have a simple answer, I store the Animation Clip and the animation trigger in a scriptable object (with other info of course) So when I want to perform the attack I just call the animation and a set a timer that is based on the animation clip length. Simple and effective.
I’m just wondering if there is a more efficient way to do this without having to store the animation (I have a ton of animation files so finding a specific one is tricky at best) is there a way I can do something like “currentAnimation.length” or anything else?
It just seems wasteful and difficult to store the clip but not be able to play the clip (have to use mechanim triggers)