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: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static Coroutine<T> StartCoroutine<T>(
	this MonoBehaviour monoBehaviour,
	IEnumerator actualCoroutine
)

Parameters

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

Type Parameters

T
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