How to use mecanim in state based - animation

I currently using mecanim for the animations,
what I want to achive is start animation by state ( int).
But then I need to connect each animation with transitions to all the others
and its getting kinda messy and not comfortable when adding more than 3 states.

thanks…

Hi Joel,

Have you looked at Sub-state Machines and BlendTrees yet?

They offer some nice ways of grouping lots of animation states together, and help keep your Animator workspace a bit less cluttered, as well as simplifying code.

The youtube Mecanim tut goes over these quite well IIRC:

Thanks a lot the sub-state is what I was looking for.