A handle for a MEC coroutine.
More...
Inherits System.IEquatable< CoroutineHandle >.
|
CoroutineHandle | OnDestroy (IEnumerator< float > action, Segment segment=Segment.Update) |
| This will execute the coroutine you pass in once the coroutine this handle is pointing to is ended. This works whether this coroutine gets to the end of its function, throws an exception, or is the target of a KillCoroutines command. NOTE: It is generally a bad idea to use this function on any coroutine that you would use a CancelWith command on, because that will typically lead to exceptions when the gameObject is destroyed. More...
|
|
CoroutineHandle | OnDestroy (System.Action action, Segment segment=Segment.Update) |
| This will execute the function you pass in once the coroutine this handle is pointing to is ended. This works whether this coroutine gets to the end of its function, throws an exception, or is the target of a KillCoroutines command. NOTE: It is generally a bad idea to use this function on any coroutine that you would use a CancelWith command on, because that will typically lead to exceptions when the gameObject is destroyed. More...
|
|
|
bool | IsAliveAndPaused [get, set] |
| Is true while the coroutine is paused. Setting this value will pause or resume the coroutine.
|
|
bool | IsRunning [get, set] |
| Is true until the coroutine function ends or is killed. Paused or waiting coroutines count as running. Setting this to false will kill the coroutine.
|
|
bool | IsValid [get] |
| Is true if this handle may have been a valid handle at some point. (i.e. is not an uninitialized handle, error handle, or a key to a coroutine lock)
|
|
int? | Layer [get, set] |
| Get or set the corrosponding coroutine's layer. Null removes the layer or represents no layer assigned.
|
|
Segment | Segment [get, set] |
| Get or set the coorsponding coroutine's segment.
|
|
string | Tag [get, set] |
| Get or set the corrosponding coroutine's tag. Null removes the tag or represents no tag assigned.
|
|
A handle for a MEC coroutine.
◆ OnDestroy() [1/2]
This will execute the coroutine you pass in once the coroutine this handle is pointing to is ended. This works whether this coroutine gets to the end of its function, throws an exception, or is the target of a KillCoroutines command. NOTE: It is generally a bad idea to use this function on any coroutine that you would use a CancelWith command on, because that will typically lead to exceptions when the gameObject is destroyed.
- Parameters
-
action | The coroutine that you want to execute after this coroutine ends. |
segment | The timing segment that the OnDestroy coroutine should be executed in. |
- Returns
◆ OnDestroy() [2/2]
This will execute the function you pass in once the coroutine this handle is pointing to is ended. This works whether this coroutine gets to the end of its function, throws an exception, or is the target of a KillCoroutines command. NOTE: It is generally a bad idea to use this function on any coroutine that you would use a CancelWith command on, because that will typically lead to exceptions when the gameObject is destroyed.
- Parameters
-
action | The function that you want to execute after this coroutine ends. |
segment | The timing segment that the OnDestroy action should be executed in. |
- Returns