Callbacks can be used to make sure certain things run on Unity's main thread. To use them, call Callback.MainThread(delegate(){ main thread code in here }); Note that order is not necessarily retained if you happen to call it on the main thread anyway - it will run immediately.
Public Member Functions | |
Callback (MainThreadDelegate mtd) | |
Static Public Member Functions | |
static void | MainThread (MainThreadDelegate toRun) |
Queues the given delegate in order to run it on the main Unity thread. More... | |
Public Attributes | |
Callback | NextCallback |
Stored as a linked list - this is the next callback. More... | |
MainThreadDelegate | ToRun |
The delegate to run. More... | |
Properties | |
static bool | WillRunImmediately [get] |
True if callbacks will run immediately with no delay. More... | |
static bool | WillDelay [get] |
True if callbacks will be delayed until the next callback run. More... | |
|
inline |
|
inlinestatic |
Queues the given delegate in order to run it on the main Unity thread.
Callback PowerUI.Callback.NextCallback |
Stored as a linked list - this is the next callback.
MainThreadDelegate PowerUI.Callback.ToRun |
The delegate to run.
|
staticget |
True if callbacks will be delayed until the next callback run.
|
staticget |
True if callbacks will run immediately with no delay.