Stops all coroutines for the specific method name running on this behavior.
function Start() { / / Start Coroutine DoSomething StartCoroutine("DoSomething", 5.0); // Wait for 2 seconds yield WaitForSeconds(2.0); // Stop Coroutine DoSomething StopCoroutine("DoSomething"); } 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 yield; } }
3.145.70.170