Search Unity

Applying Mecanim differently?

Discussion in 'Scripting' started by Nemox, Nov 28, 2012.

  1. Nemox

    Nemox

    Joined:
    Feb 16, 2010
    Posts:
    396
    So I've watched a few tutorials on Mecanim, but none of them touched on something that I need to know. The blend tree editor is an absolutely wonderful system that allows me to visually do what previously I had a very ugly (albeit highly similar) system for. I also love that it's able to animate my characters regardless of what its bones' names are.

    However, what I want to do is to shift my character's animation states directly via scripting, and shift characters into entirely new states on the fly. IE: My character has a "walk" state but no "fly" state, but I want to shift him into an arbitrary "fly" state I've set up for another character.

    Is this sort of thing possible, and if so where's a reliable source to read up on Mecanim scripting?