| BetterCoroutinesExtensionsStartBetterCoroutineLinked Method (GameObject, IEnumerator, Int32) |
Starts a new coroutine with its lifetime linked to this gameobject.
The coroutine will be stopped when the linked gameobject is disabled or destroyed.
Namespace:
Archon.SwissArmyLib.Coroutines
Assembly:
Archon.SwissArmyLib (in Archon.SwissArmyLib.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static int StartBetterCoroutineLinked(
this GameObject gameObject,
IEnumerator enumerator,
int updateLoopId
)
Request Example
View SourceParameters
- gameObject
- Type: GameObject
The gameobject to link the coroutine to. - enumerator
- Type: System.CollectionsIEnumerator
[Missing <param name="enumerator"/> documentation for "M:Archon.SwissArmyLib.Coroutines.BetterCoroutinesExtensions.StartBetterCoroutineLinked(UnityEngine.GameObject,System.Collections.IEnumerator,System.Int32)"]
- updateLoopId
- Type: SystemInt32
Which update loop should the coroutine be part of?
Return Value
Type:
Int32The id of the coroutine.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
GameObject. 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