title: Unity Animator.Play how to transition to another animation at the same time
body: <p>I currently have a sprite-based animation in which the player is running. I also have another animation where the player is running and holding a gun out and shooting, that plays at the exact same speed as the player running without the gun. The catch is, I'm using Animator.Play();</p>
  
  <p>What I want is to start the player running with gun animation at the frame that the player running animation is currently at. For instance, if player running animation is at frame 20, and the player presses the shoot button, play the running with gun animation at frame 20.</p>
  
  <p>Here is a rough example of my code so far:</p>
  
  <pre><code>if (!shooting) {animator.Play("PlayerRunning");}
  
  if (shooting) {animator.Play("PlayerRunningShoot");}
  </code></pre>
  
  <p>I think the best example would be one of the NES megaman games' megaman shooting animataion, where when you press 'B' while running, his arm will immediately pop-up to shoot.</p>
  
  <p>If any of this is confusing on what I am asking, let me know.</p>