- Home /
 
              This question was 
             closed Jun 15, 2015 at 07:52 PM by 
             Griffo for the following reason: 
             
 
            Used other method ..
 
               Question by 
               Griffo · Mar 19, 2015 at 06:28 AM · 
                animationblend treeblendtree  
              
 
              Get current state of blend tree ?
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.<Animator>();                    
 }
 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.

 
                 
                screen-shot-2015-03-18-at-213206.png 
                (56.9 kB) 
               
 
              
               Comment