title: Why is Unity crashing when I press play in the editor?
body: <p>My game is crashing whenever I switch scenes and then press play in the editor. I am using this code to switch scenes: </p>
  
  <p><img src="https://i.stack.imgur.com/QaSrZ.png" alt="enter image description here"></p>
  
  <p>... </p>
  
  <p><img src="https://i.stack.imgur.com/ajjyA.png" alt="enter image description here"></p>
  
  <p>I have tried disabling most of the scripts in my game to debug the problem but it freezes every time. I've also tried loading the levels without the co-routines but that doesn't help. I can continue playing the game as long as I don't use the editor controls, however things get pretty choppy and performance becomes terrible. </p>