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

StopAllCoroutines

Stops all coroutines running on this behavior.

Example

  function Start() {
// Start Coroutine DoSomething
  StartCoroutine("DoSomething", 5.0); 

//  Wait for 1 seconds
  yield WaitForSeconds(1.0);

  // Stop All Coroutine
  StopAllCoroutines();
}

function DoSomething (someParameter : float) {
  while (true) {
    // DoSomething Loop
    Debug.Log ("DoSomething Loop = " + Time.time);
    // Yield execution of this coroutine and return to the main loop until next frame
    yiel
    ]

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