Animancer streamlines the animation development pipeline by removing the need to create Animator Controllers and scripts that need to interact with each other. Instead, it gives scripts the ability to fully define all animation logic.
The following diagram shows how it fits into the animation pipeline:
The benefits of Animancer can be summarised in five key areas:
- Adaptability - Animancer allows your scripts to define the animations they will be using in whatever way you find most logical for each situation instead of forcing you to define the structure of a state machine all in one place separately from your scripts like Mecanim. Fewer dependencies on logic outside your scripts means fewer bugs in your scripts.
- Simplicity - Animancer can play animations on-demand without any extra preparation instead of forcing you to define the exact structure of all your states, transitions, and parameters in the Unity Editor like Mecanim. Fewer steps means faster development.
- Safety - Animancer allows you to directly reference
AnimationClips instead of using Magic Strings so it avoids the common problems they cause when using Mecanim. No more time wasted fixing bugs caused by misspelling a state name or renaming something without knowing where you need to update that name in your code. You can still choose to use strings if you want to.
- Clarity - Animancer makes it clearer what each object needs and can do. A script with a
Jump Animationfield in the Inspector obviously needs a jump animation, or if it doesn't have a jump script then the character can't jump and doesn't need that animation. No more time wasted looking at the contents of an Animator Controller without any clear indication of which scripts interact with it (if any).
- Reliability - Animancer will always do exactly what your scripts tell it to do instead of trying to manage its own behaviour like Mecanim. Animancer won’t simply ignore your attempt to start a transition because it isn't in the right state and won’t require you to check whether the animation you just told it to play is actually being played. If you tell it to play multiple animations in the same frame, Animancer will end up playing the last one as you would expect while Mecanim will only play the first one and ignore the rest.
The following sections go into further detail about the problems with Mecanim and outline some common situations you may encounter during development to compare how they could be approached with either system.
|Why Replace Mecanim?||Unity’s Mecanim animation system was designed to be easily accessible to people without much programming experience. It achieves that goal quite well, but doing so creates the illusion that animations should define the way your game works, when in fact the opposite is true.|
|Playing||How to play a single animation (with or without scripting).|
|Waiting||How to wait until an animation ends before running some code.|
|Speed and Time||How to manipulate the speed and time of animations.|
|Weapon Animations||How to set up a system where each weapon has its own attack animations.|
|Performance||Animancer can be more efficient than other systems if used correctly, though in most cases the differences are small enough not to matter either way.|