The CoroutineService allows any system to start a Unity coroutine, even if that system is not a MonoBehaviour or associated with a GameObject. Beamable runs many coroutines per player instance to manage multiple networking based resources. All coroutines are routed through the CoroutineService. The CoroutineService is a MonoBehaviour itself, and all coroutines are associated to the related GameObject. Use the StartNew method to start a coroutine.
More...
|
Action | EverySecond |
| A utility function that triggers every game second. The callback in this function will happen in a Coroutine context.
|
|
The CoroutineService allows any system to start a Unity coroutine, even if that system is not a MonoBehaviour or associated with a GameObject. Beamable runs many coroutines per player instance to manage multiple networking based resources. All coroutines are routed through the CoroutineService. The CoroutineService is a MonoBehaviour itself, and all coroutines are associated to the related GameObject. Use the StartNew method to start a coroutine.
◆ StartNew()
virtual Coroutine Beamable.Coroutines.CoroutineService.StartNew |
( |
string |
context, |
|
|
IEnumerator |
enumerator |
|
) |
| |
|
inlinevirtual |
Start a new Coroutine. The Coroutine will be attached to the GameObject that the CoroutineService is connected to.
- Parameters
-
context | A context is a semantic grouping of Coroutines. Many Coroutines can be running at the same time, so the context helps organize them. You can use the StopAll method to stop all Coroutines of a given context. |
enumerator | The Coroutine function |
- Returns
- A Unity Coroutine
◆ StopAll()
void Beamable.Coroutines.CoroutineService.StopAll |
( |
string |
context | ) |
|
|
inline |
Stop all Coroutines for a given context. You can start Coroutines with the StartNew method.
- Parameters
-
context | A context is a semantic grouping of Coroutines. Many Coroutines can be running at the same time, so the context helps organize them. |
The documentation for this class was generated from the following file:
- com.beamable/Runtime/Core/Coroutines/CoroutineService.cs