| BetterCoroutinesExtensionsStartBetterCoroutineLinked Method (MonoBehaviour, IEnumerator, Int32) |
Starts a new coroutine with its lifetime linked to this component.
The coroutine will be stopped when the linked component 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 MonoBehaviour monoBehaviour,
IEnumerator enumerator,
int updateLoopId
)
Request Example
View SourceParameters
- monoBehaviour
- Type: MonoBehaviour
The component to link the coroutine to. - enumerator
- Type: System.CollectionsIEnumerator
[Missing <param name="enumerator"/> documentation for "M:Archon.SwissArmyLib.Coroutines.BetterCoroutinesExtensions.StartBetterCoroutineLinked(UnityEngine.MonoBehaviour,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
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