Hi,
Ok I can check to see if a animation is playing in a sub state machine like below.
private var idleState = Animator.StringToHash("Locomotion.Idle");
function Start (){
_anim = GetComponent.();
}
function Update ()
{
currentBaseState = _anim.GetCurrentAnimatorStateInfo(0);
if (currentBaseState.nameHash == idleState){
// Do Stuff
}
}
But I can't seem to check a blend tree like below, anyone know how to check a blend tree state?
I thought it would be something like ..
private var AttackflameStraightState = Animator.StringToHash("Base Layer.Locomotion.Blend_Walk_Attack.Dragon_Flame_throwing_stright");
or adding Blend_Tree at he end, still don't work.
Thanks.
![alt text][1]
[1]: /storage/temp/42883-screen-shot-2015-03-18-at-213206.png
↧