There are several different animation systems available in Unity:
Legacy is Unity’s old animation system.
It uses the Animation
component which is primarily configured via the Inspector and controlled by scripts using Magic Strings.
Mecanim is Unity’s main animation system.
It uses the Animator
component with an AnimatorController
asset which is configured using the Animator window and controlled by scripts using Magic Strings.
The Mecanim vs. Animancer section explains the differences between it and Animancer in great detail and the Conversion page explains how the various features of Animator Controllers correspond to Animancer.
Animancer is a Unity plugin developed by Kybernetik.
- Animancer Pro is the fully featured version of Animancer.
- Animancer Lite is the FREE version of Animancer with limited features, though it also allows you to try out most Pro-Only Features in the Unity Editor (marked with a * in the table below).
It uses the AnimancerComponent
to give scripts full control over animations to keep logical responsibilities and dependencies separate from the visual details.
The Animancer home page gives an overview of its features while this page is dedicated to comparing it with other systems.
The Playables API is the low level API which Mecanim and Animancer are built on.
It isn't included in the table because it's so low-level that it doesn't really qualify as an animation system. It allows you to build animation systems like Animancer, but isn't easily useful on its own and is very poorly documented.
Animation System Feature Comparison |
Legacy |
Mecanim |
Animancer Lite |
Animancer Pro |
|
---|---|---|---|---|---|
Animations | |||||
Play Legacy Animation ClipsOnly the Legacy animation system can play LegacyAnimationClip s. |
|||||
Play Generic Animation ClipsMecanim and Animancer can play GenericAnimationClip s. |
|||||
Play Humanoid Animation ClipsMecanim and Animancer can play HumanoidAnimationClip s. See the section on Humanoids for more information about their features. |
|||||
Play Sprite Animation Clips"Sprite Animation Clips" don't actually exist as a separate concept, they're simply Legacy or Generic animations which happen to change theSprite of a particular component. |
|||||
Humanoids | |||||
Humanoid Animation RetargetingAny Humanoid animation can be played on any Humanoid rig. |
|||||
Humanoid Animation Mirroring on importThe import settings for Humanoid animations has a toggle to flip the animation from left to right. If you need both mirrored and un-mirrored versions of a particular animation, you will need to create two copies of it. |
|||||
Humanoid Animation Mirroring per stateIn addition to the import settings toggle, Animator Controllers also have a toggle to allow individual animation states to mirror their animation. This allows you to save some drive space and memory usage if you need both the mirrored and original version of an animation, but it also has a small cost to performance at runtime. |
|||||
Humanoid Inverse KinematicsThe Playables API exposes standard IK features which Mecanim and Animancer can utilise, but not Legacy. Also note that due to limitations in the Playables API, Unity will only ever callOnAnimatorIK on layer 0 when using Animancer. |
|||||
Target MatchingMecanim has a Target Matching system which essentially manages the application of Inverse Kinematics over time. Unfortunately that system is only usable with Animator Controllers so it doesn't work with any of the other animation systems. |
|||||
Workflow | |||||
Create new Animation Clips at runtimeUnfortunately, the only way to create a newAnimationClip at runtime is to use the Legacy animation system. This is simply a limitation of Unity. |
|||||
Load new Animation Clips at runtime using Asset Bundles
|
|||||
No need for Animator ControllersMecanim requires that all possible animation states be defined upfront in the Unity Editor as part of an Animator Controller asset and imposes severe limitations on your ability to control things at runtime. Legacy was primarily designed around assigning the animations you want to an array in the Inspector, but it does allow scripts to add more animations dynamically at runtime. Animancer supports both Animator Controllers and assigning animations to an Inspector array, but its main focus is on allowing scripts to play any animation on-demand at runtime without requiring any extra preparation beforehand. |
|||||
No need for magic stringsLegacy and Mecanim are designed around assigning animations upfront so that scripts need to use Magic Strings to refer to them by name. Animancer supports name based referencing as well, but it's usually better to just give Animancer the animation you want to play when you want to play it as demonstrated in most of the Samples. |
|||||
Powerful Inspector interface for debugging and testingTheAnimancerComponent shows all of its internal details in the Inspector so that you can view and modify their parameters in real time. See the Inspector page for more information. |
|||||
Configure animation and transition details in Edit Mode with previewsMecanim allows you to configure details like play speed and transition duration when setting up the Animator Controller and gives you live previews so you can see what everything will look like without entering Play Mode. Legacy requires you to specify those details in your scripts. Animancer supports both approaches. You can use Transitions to configure the details in the Inspector or you can control all those details in a script without any additional setup. |
* | ||||
Use Animation Curves to control custom parametersIf a parameter in an Animator Controller has the same name as a curve in any of the animations it's playing, Mecanim will automatically update that parameter every frame with the value of the curve at the current animation time. If it's blending between multiple animations with the same curve, the value of the parameter will also be blended between them. Animancer supports the same thing with Animated Properties as demonstrated in the Uneven Ground sample. |
* | ||||
Well documented source code includedAnimancer Pro includes the full source code so that you can look through it, debug problems, and make any necessary modifications without being dependant on the author for help. The Animancer.Lite.dll files in the Pro package are empty dummies to ensure seamless upgrades from Lite to Pro. They contain no code and are not included in builds. Animancer Lite only includes the source code for the State Machine system, various utilities, and of course the full source code of all the sample scenes. |
|||||
Control | |||||
Control animation details dynamically (transition duration, speed, time, weight, etc.)Mecanim encourages you to configure parameter based transitions using the Animator window which then can't be changed at runtime. It gives you no real control over individual animation weights. It does allow you to control speed and time indirectly by creating a parameter to control them then modifying that parameter, however in the case of time this means that you need to manually update the parameter every frame to keep playing (you can't simply set the time when you want to change it and let it play normally the rest of the time). The other systems give scripts access to these parameters without any additional steps. |
* | ||||
Control is immediate and reliableWhen you command an Animator Controller (such as changing its state), it will not actually respond until the next time it gets updated and it might not even do what you want. For example, if you call
The other systems will respond to commands immediately and can properly handle multiple commands in the same frame.
|
|||||
Animation eventsAll the animation systems mentioned here support Unity's inbuilt Animation Events. |
|||||
Custom event systemAnimancer Events are often more convenient to use then Animation Events. The Events page compares their differences. |
* | ||||
Easily wait for animations to finishAnimancer supports several easy ways of Waiting for Animations to End, including Events and the ability to simplyyield return an AnimancerState in a Coroutine. |
|||||
Easily begin transitions before the previous animations finishWhen configuring a transition in Mecanim or Animancer, you can adjust its timing independantly of the actual end of the animation to tweak the result as you see fit. Legacy allows you to queue animations to play or cross fade one after the other, but the transition always occurs when the previous animation finishes. |
|||||
Access details of animations that aren’t currently playingMecanim only allows scripts to access the details of the current state or the next state being transitioned towards. The other systems give scripts full access to the details of any animation at any time. |
|||||
Unscaled Time Update ModeAll animation systems support Animate Physics and Manual update modes, but only Mecanim and Animancer support Unscaled Time mode which can be useful for things like GUI animations which should always play at their regular speed even while the game is paused. |
|||||
Easily use Animation Jobs and custom state typesAnimancer allows you to easily utilise Animation Jobs for low level access to the animation stream as well as creating your own state types by inheriting fromAnimancerState (or any of its child classes) so that you can implement custom behaviour. For example, you might inherit from MixerState to implement a new blending algorithm. |
* | ||||
Blending | |||||
Smoothly transition between animations over timeAll systems support blending between animations over time, known as Cross Fading. Animancer Lite doesn't allow you to specify a custom fade duration in runtime builds. You can try out any value in the Unity Editor, but it will only use the default 0.25 seconds in a runtime build. |
* | ||||
Smoothly transition back into an animation that is currently endingImagine you want to repeatedly perform an action consisting of a single animation with a smooth transition from the end of one action to the start of the next. Most systems only allow each state to have one set of values; it can either be near the end and fading out or near the start and fading in, but not both. Attempting to do so will cause it to either snap back to the start without a smooth transition or ignore you completely, depending on the system. Animancer has FadeMode.FromStart which checks if the animation state is still in use and will simply create another state for the same animation if necessary. This allows the new state to fade in from the start while the previous state continues fading out. You could potentially do the same thing with the other systems, but it'sn't built in and Mecanim in particular would require significantly more effort because it doesn't allow states to be created dynamically at runtime. The Transitions sample explains this concept in greater detail. |
|||||
Custom fade easing curvesAnimancer has a Custom Easing system which makes it easy to replace the default Linear Interpolation with a different algorithm of your choice. |
* | ||||
Mix and blend between multiple Animator ControllersMecanim only allows one Animator Controller at a time while Animancer's Controller States allow you to mix multiple controllers with each other and with individual animations controlled directly by scripts. |
* | ||||
Blend Timeline Assets with other animationsAnimancer'sPlayableAssetState s allow Timeline Assets to be played and blended with other animations, just like any other state. |
* | ||||
Animation LayersLayers allow you to manage multiple animations at the same time, generally on different body parts. Also note that Animancer and Legacy allow you to change which layer an animation is playing on at runtime while Mecanim doesn't. |
* | ||||
Blend Trees / Animation MixersBlend Trees allow you to interpolate between multiple animations based on a parameter. For example, you might blend between idle, walk, and run based on how fast you want to move so that you can have your character animate appropriately for any speed based on how far the user tilts a joystick instead of only having a few specific speeds you can move at. Animancer can play Blend Trees inside Animator Controllers, but also has Mixer States which serve the same purpose and allow much greater control over their internal details. |
* | ||||
Controllable Mixer SynchronizationAnimancer's Mixer States can automatically Synchronize the normalized times of their animations so that the related parts of each one are playing at the same time to give a much more realistic blended result. For example, when blending between Walk and Run animations you would want them to both put the character's right foot down at the same time so that the resulting pose is a blend of Walk (with right foot down) and Run (with right foot down) rather than blending different parts of each animation. Synchronization can be disabled for any or all states. For example, you might want to synchronize Walk and Run animations but not an Idle animation because its time doesn't correspond to the same cycle as the others. The Optional Synchronization section explains it in more detail. Blend Trees also synchronize their animation times (and Humanoid animations use Foot Phase Synchronization as mentioned below), but they always apply it to everything and you have no control over it. This means that blending between a long Idle and shorter Walk animation would speed up the Idle and slow down the Walk, causing the character to walk arbitrarily slower based on the length of their Idle animation which makes no sense. |
* | ||||
Foot Phase SynchronizationSimply synchronizing the normalized time of a group of animations as mentioned above gives good results when the animations are similar such as with regular Walk and Run animations. But that simple approach doesn't work so well for irregular animations such as trying to synchronize a regular Walk animation with a Walk-With-Limp where the character spends more time on one foot than the other. Blend Trees solve this using a technique called Foot Phase Synchronization which usually gives much better results than simple time synchronization. This feature is always on for Blend Trees and can't be turned off. Unfortunately, Unity doesn't expose the data necessary to perform Foot Phase Synchronization at runtime so Animancer's Mixer States aren't able to use it. Using Controller States to play an Animator Controller with a Blend Tree will allow its Foot Phase Synchronization to work normally though. |
|||||
Root MotionTraditional animations generally remain fixed in place and rely on other systems to move characters around such as Rigidbodies or Character Controllers. For example, a walk animation would move the character's arms and legs naturally, but the character itself would remain in place as if walking on a treadmil. Root Motion allows animations to move the character around more naturally. This allows you to trade some dynamic scripting control in exchange for more natural motion. |
|||||
Finite State Machines | |||||
General purpose Finite State MachineAnimator Controllers can be used to manage the gameplay state of an object as part of its animation state. Animancer isn't tied to a specific state machine implementation, but it does include a general purpose Finite State Machine system in the Animancer.FSM is immediate and reliable. It doesn't need to wait for the next update to respond to your commands. It doesn't actually have an update loop of its own, but you can easily give your states an update method (or methods) for whatever rate you need (Update , FixedUpdate , LateUpdate , etc.) |
|||||
Visual configuration interfaceMecanim provides a Graphical User Interface for configuring animation states, transitions, and other details in the Unity Editor instead of allowing those details to be controlled using scripts like the other systems. One of the main advantages of this visual interface is the ability to preview the transitions between animations in Edit Mode. Animancer primarily focusses on the use of scripts to control animations, however it does allow you to createAnimatorController assets using Mecanim's visual interface and play them using Controller States. |
|||||
Constructed by scriptsTheAnimancer.FSM system is entirely configured and controlled by scripts so the logic for what happens during a particular state can be defined alongside the logic for when it will transition to other states rather than having some of that logic in an Animator Controller and the rest in scripts. |
|||||
Structure can change dynamically at runtimeThe full structure of an Animator Controller must be defined in the Unity Editor and cannot be changed at runtime But theAnimancer.FSM system can be changed based on any criteria you want and doesn't even need to have all its states defined in the same place or configured on startup. |
|||||
States can be MonoBehaviour, ScriptableObject, or any other typeThe only requirement for a class to be used as a state in theAnimancer.FSM system is to implement IState . This means they can be MonoBehaviour components to receive updates, collision events, and other messages, or ScriptableObject assets which can be referenced anywhere in the project, or even just regular classes which are fully constructed and managed by scripts. |
|||||
Inbuilt networking supportMecanim allows Animator Controllers to be synchronised across a network using the Network Animator component (though that system is now deprecated). Animancer and Legacy don't have anything similar, though the Animation Serialization sample explains how it could be implemented in Animancer. |
|||||
Animancer Tools | |||||
Pack multiple separate textures into one.Rather than having a separate texture asset for eachSprite , it's generally more efficient to group many of them into a single texture which can be easily done using the Pack Textures tool. |
|||||
Edit Sprite details directly in the Inspector.Normally when you select aSprite asset the Inspector only shows a few of its details and you need to open the Sprite Editor if you want to modify any of them, but Animancer adds a Custom Inspector which allows you do edit everything directly. |
|||||
Modify the rect, pivot, alignment, and borders of many Sprites at once.Unity's Sprite Editor allows you to edit the details of individualSprite s, but is very tedious to use if you have to perform the same modification to lots of them so the Modify Sprites tool allows you to edit many at once. It can set the rect , pivot , alignment , and border of a Sprite . The Rename Sprites tool handles their names. |
|||||
Rename multiple Sprites at once.When Unity's Sprite Editor createsSprite s from an image asset, it gives them all the same name as the image with a number on the end which isn't very helpful if you have lots of them. The Rename Sprites tool allows you to rename multiple Sprite s at once instead of doing them one at a time. |
|||||
Generate animations from Sprites based on their names.Unity's inbuilt method for creatingSprite animations is to Drag and Drop them into the Hierarchy window which is somewhat tedious if you need to create multiple animations, so the Generate Sprite Animations tool allows you to instantly generate animations from Sprite s based on their names. If you haven't given your Sprite s useful names yet, the Rename Sprites tool makes it easy to do so. |
|||||
Change an animation to use different Sprites.The Remap Sprite Animation tool allows you to change an animation to use differentSprite s. You can assign each Sprite individually, or drag and drop a whole group onto the New Sprites list to assign them all in one go. Otherwise you would need to change them one by one in Unity's Animation window. |
|||||
Change the Hierarchy paths used by an animation.Animations store the names of each of the objects in the Hierarchy that they animate so that they can figure out what to control when they are played, but if an object is renamed then the animation will no longer have the correct name so it won't control that object anymore. The Remap Animation Bindings tool allows you to change the object names used by an animation. Unity doesn't provide any inbuilt way to do this without writing your own Editor script. |