title: WaitForSeconds seems to change time.time but doesn't actually wait
body: <p>I have a simple spawner script in a Unity game that should instantiate an enemy and then wait a number of seconds before spawning another enemy. To do this I set up a co-routine using WaitForSeconds but when I start the game all the enemies spawn at once. Whats confusing me is that I've written in some Debug logs posting the time before WaitForSeconds is executed and the time after WaitForSeconds is executed. The debug logs show that the right amount of time has passed but all the enemies are created instantly so there is obviously no waiting between instantiations. The time between spawns is set using the inspector in the unity engine and so 'TimeBetweenSpawns' is currently set to 10 seconds to make it obvious if the time is actually being waited. The script is below:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class TESTspawner : MonoBehaviour {
  
      //PUBLIC VARIABLES
      public GameObject Enemy;
      public int NumberOfEnemies;
      public int NumberOfWaves;
      public int TimeBetweenSpawns;
      public int TimeBetweenWaves;
      public Transform SpawnPoint;
      //PRIVATE VARIABLES
      private int EnemyCount = 0;
      private int WaveCount = 0;
  
      //Wait Co-routine
      IEnumerator Wait(int x){
          Debug.Log ("Wait Time start: " + Time.time);
          yield return new WaitForSeconds(x);
          Debug.Log ("Wait Time end: " + Time.time);
      }
  
      // Use this for initialization
      void Start () {
  
      }
  
      // Update is called once per frame
      void Update () {
          if(WaveCount &lt; NumberOfWaves){
              if(EnemyCount &lt; NumberOfEnemies){
                  Instantiate(Enemy, SpawnPoint.position, Quaternion.identity);
                  EnemyCount++;
                  StartCoroutine(Wait(TimeBetweenSpawns));
              }else{
                  StartCoroutine(Wait (TimeBetweenWaves));
                  WaveCount++;
              }
          }
      }
  }
  </code></pre>
  
  <p>EDIT</p>
  
  <p>I've removed the co-routine and swapped it for using a much simpler timer variable. This code now works exactly as intended.</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class TESTspawner : MonoBehaviour {
  
      //PUBLIC VARIABLES
      public GameObject Enemy;
      public int NumberOfEnemies;
      public int NumberOfWaves;
      public int TimeBetweenSpawns;
      public int TimeBetweenWaves;
      public Transform SpawnPoint;
      //PRIVATE VARIABLES
      private int EnemyCount = 0;
      private float SpawnTimer;
  
      // Use this for initialization
      void Start () {
  
      }
  
      // Update is called once per frame
      void Update () {
          if(EnemyCount &lt; NumberOfEnemies){
              SpawnTimer += Time.deltaTime;
              if(SpawnTimer &gt;= TimeBetweenSpawns){
                  Instantiate(Enemy, SpawnPoint.position, Quaternion.identity);
                  EnemyCount++;
                  SpawnTimer = 0;
              }
          }
      }
  }
  </code></pre>