title: Time Delay for a process in Unity 3D
body: <p>I have to give the delay for the process to happen, which I am calling in the Update function.
  I have tried CoUpdate workaround also. Here is my code:-</p>
  
  <pre><code>function Start() 
  {
    StartCoroutine("CoStart"); 
  } 
  function CoStart() : IEnumerator 
  { 
    while(true) 
    { 
      yield CoUpdate(); 
    } 
  } 
  function CoUpdate() 
  { 
    //I have placed the code of the Update(). 
    //And called the wait function wherever needed. 
  } 
  function wait() 
  { 
     checkOnce=1; //Whenever the character is moved. 
     yield WaitForSeconds(2); //Delay of 2 seconds. 
  }
  </code></pre>
  
  <p>I have to move an object when a third person controller(which is another object) moves out of a boundary. I have included "yield" in my code. But, the problem happening is: The object which was moving when I gave the code for in the Update(), is moving, but isn't stopping. And it is moving up and down. I don't know what is happening! Can someone help? Please, thanks.</p>