Starts a coroutine.
The execution of a coroutine can be paused at any point using the
yield statement. The
yield return value specifies when the coroutine is resumed. Coroutines are excellent when modeling behavior over several frames. Coroutines have virtually no performance overhead.
StartCoroutine function always returns immediately, however you can yield the result. This will wait until the coroutine has finished execution.
StartCoroutine, as the compiler will do this for you. When writing C# code you must call
In the following example, we show how to invoke a coroutine ...