im using this script:
Code: Select all
function Start()
{
charController = GetComponent(CharacterController);
animation.wrapMode = WrapMode.Loop;
animation["fire"].wrapMode = WrapMode.Once;
animation["idle"].layer = -1;
animation["walk"].layer = -1;
animation["run"].layer = -1;
animation["jump"].layer = -1;
animation.Stop();
}