Click or drag to resize

ExtensionMethodsStartCoroutineT Method

Use by calling this.StartCoroutine and assigning it to a Coroutine. Then you can call your assigned coroutine.Cancel(), or .HasFinished, or a variety of other neat things.

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: (
public static Coroutine<T> StartCoroutine<T>(
	this MonoBehaviour monoBehaviour,
	IEnumerator actualCoroutine


Type: MonoBehaviour
Type: System.CollectionsIEnumerator
The coroutine you want to start

Type Parameters

The return type of the yield that can be accessed with .Value. If you don't need this, just pass in whatever.

Return Value

Type: CoroutineT
The fancy coroutine that you can track and cancel whenever you like.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MonoBehaviour. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also