Looking for a Simple Mecanim Walking Script?
In this Unity tutorial I’ll break down the basics of scripting Mecanim animations. In a previous tutorial, Script Mecanim Animations, I had a lot of questions regarding common errors and issues when trying to follow along. In that tutorial I covered some more intermediate Mecanim aspects such as using a 1D blend tree. Scripting in Mecanim can seem a bit confusing at first, and even more so when you throw in blend trees. I decided to get back to the basics of creating a very simple walking animation.
For this we’ll use a rigged character provided to you in the project files below. This is a rigged character created in MakeHuman and it properly setup for Mecanim. I also included an empty Animator Controller which is already assigned to the Animator Component of the character. With all that done we can then focus on the animations and the scripting aspect alone.
The project files are linked below.