- Home /
Mecanim add state dynamically
Hello all,
I've been looking ages for a way to create a new state dynamically, to basically create a dynamic animation controller.
My issue is that I can get the motion for a certain state, since I can iterate through the animator and animator controller states, but the motion is referred to the original modelimporter fbx, and not the actual animationclip applied to the avatar of the animator.
Is there a way to get the actual animationclips that are 'created' for the animator controller avatar? And more to the point, is it possible to dynamically add a state, and assign a motion to it so that it's "modeled" for that avatar? (transitions are a consequence, and of no interest in this question for now).
Thanks.
Did you ever find a solution to this problem? I am trying to do something very similar, but have been unable to solve the problem of assigning animation clips from an fbx onto an AnimatorController.
http://answers.unity3d.com/questions/731915/setanimationclip-on-mechanim-state-using-script.html
tell me if you succeeded in editing the motion clips of states dynamically. However I think the better approach is to just edit the AnimatorController on the Animator component dinamically.
Your answer
Follow this Question
Related Questions
Mecanim - Detect End of state properly 1 Answer
mecanim dynamic animation choice 0 Answers
Mecanim Modular State Handling 0 Answers
Accessing a Mecanim state through scripting, then changing the associated clip--Can it be done? 2 Answers
How can I make my Animator State's Motion looping dynamically? 0 Answers