Class TaskSchedulerWebGL
Provides the means to schedule tasks on a background thread or the main thread. Also allows for creation of co-routines from classes that do not inherit from MonoBehaviour.
This is thread safe, through it must be constructed on the main thread.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Services.Lobbies.Scheduler
Assembly: solution.dll
Syntax
public sealed class TaskSchedulerWebGL : TaskScheduler
Methods
Name | Description |
---|---|
IsMainThread() | Determines whether the current thread is the main thread. WebGL currently runs on a single thread, so this will always be false. |
ScheduleBackgroundTask(Action) | Schedules a new task on a background thread. NOTE: In WebGL, multi-threading isn't supported, so this will be scheduled on main thread instead. |
ScheduleMainThreadTask(Action) | Schedules a new task on the main thread. The task will be executed during the next update. |