title: How to apply an interval/ delay to a for loop in Unity
body: <p>I'm attempting to begin my scene with a random number from 1-3 being generated in a for loop.</p>
  
  <p>I intend for the number to be random each time, however i don't wan't the same two numbers to be generated directly after each other, instead firstly generating a random number between 1-3, then waiting 60 seconds, generating a random number between 1-3 excluding the most recently generated number.</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class KOTH_ZoneRandom : MonoBehaviour
  {
      int Rand;
      int Lenght = 4;
      List&lt;int&gt; list = new List&lt;int&gt;();
      void Start()
      {
          list = new List&lt;int&gt;(new int[Lenght]);
  
          for (int j = 1; j &lt; Lenght; j++)
          {
  
              Rand = Random.Range(1, 4);
  
              while (list.Contains(Rand))
              {
                  Rand = Random.Range(1, 4);
              }
  
              list[j] = Rand;
              print(list[j]);
          }
  
      }
  }
  </code></pre>
  
  <p><em>Edit</em> attempted to implement a co-routine to act as an interval for the loop. however it's still not working, its prints to the console so the co-routine is definitely being executed, however the WaitForSeconds function doesn't seem to be working. </p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class KOTH_ZoneRandom : MonoBehaviour
  {
      int Rand;
      int Length = 4;
      List&lt;int&gt; list = new List&lt;int&gt;();
      void Start()
      {
          list = new List&lt;int&gt;(new int[Length]);
  
          for (int j = 1; j &lt; Length; j++)
          {
              StartCoroutine(loopDelay());
              Rand = Random.Range(1, 4);
  
              while (list.Contains(Rand))
              {
                  Rand = Random.Range(1, 4);
              }
  
              list[j] = Rand;
              print(list[j]);
          }
  
      }
      IEnumerator loopDelay ()
      {
  
          print("started delay");
          yield return new WaitForSeconds(60);
      }
  }
  </code></pre>