Without Scripting
How to play a single animation on a model, without any scripting.
Mecanim | Animancer |
---|---|
|
|
With Scripting
How to play an animation when the user clicks the mouse. This is covered in much greater detail by the Quick Play example.
Mecanim | Animancer |
---|---|
It's also important to note that if you tell it to play (or cross fade) multiple animations in the same frame, it will only play the first one and ignore the rest. So if a character jumps ( |
|
Here's what the Mecanim setup process looks like (about 55 seconds long):
And here's what the Animancer setup process looks like (about 25 seconds long):
The overall setup time ends up being fairly similar for both systems. Mecanim spends more time configuring things in the Unity Editor while Animancer uses a longer script to control those same things. The major differences start showing up when you look at the way they affect the development of your project. Consider the following subjects:
Understanding
What do you need to look at to understand how a character works?
Imagine you want to look at a character someone else has set up to figure out how it works or maybe you have just forgotten exactly how a character works because you haven't worked on them in a while. Maybe you want to add a new action they can perform or need to track down and fix a bug.
Mecanim | Animancer |
---|---|
|
|
Where do you need to look to figure out how those animations are being controlled?
Mecanim | Animancer |
---|---|
|
|
Reuse
What do you need to do to set up the same behaviour again for another character?
Mecanim | Animancer |
---|---|
|
|
That's pretty simple so far, but consider what happens after that.
What if you want to add another action?
Mecanim | Animancer |
---|---|
|
|
What if you just want to rename an action?
Mecanim | Animancer |
---|---|
|
Animancer doesn't normally care about animation names. But let's say you just want to rename the AnimationClip reference field (maybe from _Action to _PrimaryAction so you can add a _SecondaryAction ).
|
Aside from the obvious difference in the number of steps required to do anything, there's a clear pattern here. The Animator Controller is useless without the script, but looking at it can't tell you which script that is. The Mecanim script is also useless without the controller, but looking at it can't tell you which controller it needs either. The script simply hopes that a state called "Action"
actually exists and then gives up responsibility for what happens after the animation is started without giving any indication that it expects the controller to automatically return to Idle afterwards. Every time you want to change anything to do with the Mecanim character, it involves modifying the script and then manually finding every Animator Controller it is used for and making the corresponding modifications there.
Mecanim even allows you to use parameters to control transitions instead of calling Play
with the state name directly, but that only makes the problem worse by giving you more things to manually repeat for every Animator Controller, more chances for something to go wrong, and more of a disconnect between what the script expects to happen and what will actually happen.
The Animancer script on the other hand dictates exactly how everything works. When you add it to an object you get to see exactly which animations it will use in the Inspector. When it plays an animation it takes responsibility for whatever it expects to happen once it is done. And when you make a modification you do not need to manually go through all the assets it touches to make corresponding modifications.
The Adaptability page goes into more detail about these issues.