- Home /
how to apply different numbers of attack animations in code for animation controller?
i'm using unity5.
basically i have many characters with different numbers of attack animations, most of them is 1, but can be as many as i want. every time the they attack, they will play the animation randomly(or in sequence).
currently i have a AnimationController
with just one attack state, and i used a AnimationOverrideController
to switch the animation every time the character attack, but it's difficult to determine when to switch the animation, and I must call the Animator.Rebind()
method to apply it which takes a lot of CPU process time.
but to make more than one AnimationController
s is a bit silly, and it will maybe work for some time, but this is a absolute bad choice.
so i run out of ideas. the good old Animation
component maybe a good choice, but that's a legacy system, in theory we must embrace the new mecanim system right?
anybody please give some thoughts? thanks!
Your answer

Follow this Question
Related Questions
Changing Animation Controller at runtime? 0 Answers
How to nest Animation file in an Animation Controller? 1 Answer
Whever I try to change an Animator value in my script, it becomes incredibly laggy [C#] 1 Answer
Animation Layer Weight Issue 1 Answer
Using twist links on a biped with Unity 6 Answers