- Home /
 
               Question by 
               martiros24 · Nov 23, 2015 at 12:55 PM · 
                animatorfbxclipparameter  
              
 
              play different clips via GetKeyDown in unity
i have the Animator with parameters of bool type

 void Update()
     {
         if (Input.GetKeyDown(KeyCode.A))
         {
             anum.SetBool("ca", true);
           //  anum.SetBool("ca", false);
         }
         if (Input.GetKeyDown(KeyCode.S))
         {
             anum.SetBool("cv", true);
         } }
but only one first keydown is working.what 2 do?
UPD: I try with integer parameter,but it also doesnt work
  if (Input.GetKeyDown(KeyCode.A))
      {
          anum.SetInteger("letter", 1);   
          print("1111111111111111");
      }
 
      if (Input.GetKeyDown(KeyCode.S))
      {
          anum.SetInteger("letter", 2);
          print("22222222222222");     
      }
 
                 
                pgmlr.jpg 
                (75.0 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                