Hi, if the mecanim animtion system supports runtime change animationclip in unity4?
for exsample, i have two animator states, StateA is normal animations, it has a blendtree that holds animationclips like idle, walk, run. and StateB has only one animationclip like attack(which in Motion or maybe in blendtree – only one animation node), at runtime, i want to change the animation in StateB.
i have search the whole scripts api, and find nothing(the interfaces are all read only).
I want to know this too…
Mecanim is good, but if Unity marks old animation “lagacy”, macanim should be able to do everything the old animation system could.
Can we now add and remove motion clips with the new 4.3 at runtime? I’ve been looking through the API and can’t see anyway to achieve this. Such a basic thing missing from mecanim yet required for customisation systems.
Hi, this is the closest thing to documentation I have found so far about AnimatorOverrideController (very bad, Unity guys!). Could you please add some extra lines of code about how to actually using it to change the “motion” property of an AnimatorController state? I coulnd’t figure out how to do it!
Sorry I think I misunderstood your question. You cannot add or remove clip at runtime, but you can override clips with AnimatorOverrideController.
By example if you have a controller with a clip ‘run’ you could override the clip ‘run’ like this.
// Put this line at the end because when you assign a controller on an Animator, unity rebind all the animated properties
animator.runtimeAnimatorController = myOverrideController;
Hello guys.
The point is to be able to add and remove clips at runtime. We can’t make a system generic enough if mecanim can’t do this, and to be honest while its great, that “non-generic enough” is the reason I guess about 80% of people still use infamous so called “Legacy”
Sorry for reviving this post but this the only one I found that got close to a solution.
So in theory, to achieve the idea of adding and removing clips we first must create a dummy Animator controller and add the number of clips that could potentially be used as “slots”?
I’ve been trying to get around that idea any way I can, as its a bit counter intuitive for my end user.
The request for my toolkit to allow for Mecanim is enormous. I had to answer “why legacy” so many times I even made a review of Mecanim back on Unity 4.2.
After the promises on version 4.3 I was really hoping I could switch to Mecanim. There has to be a work around to be able to add clips without working with the visual editor.