With Mecanim, it is also possible to blend animations for different body parts of a character. Let's see an example. You have a character that runs with a gun in its hand and you have a reload animation that the character performs each time its weapon is empty. When the character reloads, you want his upper body, actually its arms, to perform the reload action, while the lower body of the character, its legs, should keep running.
To achieve that in Unity, Mecanim features what are known as layers. Layers allow you to create masks for specific body parts of a character and apply animation clips only on those parts. A running animation that involves legs and arms can be blended with a reload animation that only involves the character's arms, the result being that the character keeps running with its legs, while its arms reload the weapon!
As layers require masks to work, in the next recipe, we will show you how to make one.