Detailed Description

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...
 

Constructor & Destructor Documentation

PowerUI.Callback.Callback ( MainThreadDelegate  mtd)
inline

Member Function Documentation

static void PowerUI.Callback.MainThread ( MainThreadDelegate  toRun)
inlinestatic

Queues the given delegate in order to run it on the main Unity thread.

Member Data Documentation

Callback PowerUI.Callback.NextCallback

Stored as a linked list - this is the next callback.

MainThreadDelegate PowerUI.Callback.ToRun

The delegate to run.

Property Documentation

bool PowerUI.Callback.WillDelay
staticget

True if callbacks will be delayed until the next callback run.

bool PowerUI.Callback.WillRunImmediately
staticget

True if callbacks will run immediately with no delay.