title: Unity - WaitForSeconds() does not work
body: <p>I am developing some flight simulator programme. Right now I am trying to get the level to restart after a delay of 4 seconds, but instead it is waiting forever and not responding. This is my code (in C#) right now: </p>
  
  <pre><code>void Update () {
  
      //other irrelevant code in front
  
      float TerrainHeightLocation = Terrain.activeTerrain.SampleHeight (transform.position);
  
      if (TerrainHeightLocation &gt; transform.position.y) { //the plane crashed
  
          StartCoroutine(Wait(TerrainHeightLocation));
  
  
      }
  }
  
  IEnumerator Wait( float TerrainHeightLocation) {
      transform.position = new Vector3 (transform.position.x,
                                        TerrainHeightLocation,
                                        transform.position.z);
      Instantiate(explosion, transform.position, transform.rotation);
      Destroy(gameObject);
  
      Debug.Log ("Waiting");
      yield return new WaitForSeconds(4.0f); // waits x seconds
  
      Debug.Log ("Waited for x seconds");
  
      Application.LoadLevel(Application.loadedLevel);
      Debug.Log ("Reloaded level");
  
  }
  </code></pre>
  
  <p>It would be a great help if anyone could find a problem in the code, because I have been trying all day and I cannot fix it.</p>
  
  <p>Thanks!</p>