Class MonoBehaviourExtensions
Inheritance
System.Object
MonoBehaviourExtensions
Namespace: Edgar.Unity
Assembly: cs.temp.dll.dll
Syntax
public static class MonoBehaviourExtensions
Methods
StartSmartCoroutine(MonoBehaviour, IEnumerator, Boolean)
Starts a smart coroutine that wraps a given coroutine object.
Declaration
public static SmartCoroutine<object> StartSmartCoroutine(this MonoBehaviour monoBehaviour, IEnumerator coroutine, bool throwImmediately = false)
Parameters
Type | Name | Description |
---|---|---|
MonoBehaviour | monoBehaviour | |
System.Collections.IEnumerator | coroutine | Coroutine that should be run in the smart coroutine. |
System.Boolean | throwImmediately | Whether to throw immediately if an exception is encountered. |
Returns
Type | Description |
---|---|
SmartCoroutine<System.Object> |
StartSmartCoroutine<TValue>(MonoBehaviour, IEnumerator, Boolean)
Starts a smart coroutine that wraps a given coroutine object.
Declaration
public static SmartCoroutine<TValue> StartSmartCoroutine<TValue>(this MonoBehaviour monoBehaviour, IEnumerator coroutine, bool throwImmediately = false)
Parameters
Type | Name | Description |
---|---|---|
MonoBehaviour | monoBehaviour | |
System.Collections.IEnumerator | coroutine | Coroutine that should be run in the smart coroutine. |
System.Boolean | throwImmediately | Whether to throw immediately if an exception is encountered. |
Returns
Type | Description |
---|---|
SmartCoroutine<TValue> |
Type Parameters
Name | Description |
---|---|
TValue | Type of value that can be returned from the coroutine. |