O'Reilly logo

Unity 3 Game Development HOTSHOT by Jate Wittayabundit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

WaitForFixedUpdate

Waits until the next frame rate of FixedUpdate function. (For more details have a look at Appendix A, Important Functions.)

WaitForFixedUpdate can only be used with a yield statement in coroutines.

Example

function Start() {
  // Wait for FixedUpdate to finished
  yield new WaitForFixedUpdate(); 
  // Call After FixedUpdate
  Debug.Log ("Call after FixedUpdate");
}

function FixedUpdate() {
  Debug.Log ("FixedUpdate");
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required