My Project
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Static Public Member Functions | List of all members
UniExtensions.MonoBehaviourExtensionMethods Class Reference

Static Public Member Functions

static T DefaultComponent< T > (this MonoBehaviour behaviour)
 Get a component from a game object, and add it if it is missing. More...
 
static void QueueWorkItem (this MonoBehaviour behaviour, string queueName, IEnumerator task)
 Schedules a coroutine to run to be after all tasks in the same queue have run. More...
 
static void QueueWorkItem (this MonoBehaviour behaviour, IEnumerator task)
 Schedules a coroutine to run to be after all tasks in the default queue have run. More...
 
static void ExecuteLater (this MonoBehaviour behaviour, float delay, System.Action fn)
 Schedules a function to be run after delay seconds. More...
 
static Coroutine RunCoroutines (this MonoBehaviour behaviour, params IEnumerator[] tasks)
 Run a number of coroutines in sequence. More...
 
static Coroutine StartCoroutine (this MonoBehaviour behaviour, IEnumerator task, System.Action whenFinished)
 Start a coroutine, then run a method when it is finished. More...
 
static Coroutine StartCoroutine (this MonoBehaviour behaviour, IEnumerator task, float T, System.Action onTimeOut)
 Run a coroutine, but if it takes too long, abort and call a method. More...
 

Member Function Documentation

static T UniExtensions.MonoBehaviourExtensionMethods.DefaultComponent< T > ( this MonoBehaviour  behaviour)
inlinestatic

Get a component from a game object, and add it if it is missing.

Parameters
gA GameObject
Returns
A T
Type Constraints
T :Component 
static void UniExtensions.MonoBehaviourExtensionMethods.ExecuteLater ( this MonoBehaviour  behaviour,
float  delay,
System.Action  fn 
)
inlinestatic

Schedules a function to be run after delay seconds.

Parameters
behaviourBehaviour.
delayDelay in seconds.
fnThe function to run.
static void UniExtensions.MonoBehaviourExtensionMethods.QueueWorkItem ( this MonoBehaviour  behaviour,
string  queueName,
IEnumerator  task 
)
inlinestatic

Schedules a coroutine to run to be after all tasks in the same queue have run.

Parameters
behaviourBehaviour.
queueNameQueue name.
taskTask.
static void UniExtensions.MonoBehaviourExtensionMethods.QueueWorkItem ( this MonoBehaviour  behaviour,
IEnumerator  task 
)
inlinestatic

Schedules a coroutine to run to be after all tasks in the default queue have run.

Parameters
behaviourBehaviour.
taskTask.
static Coroutine UniExtensions.MonoBehaviourExtensionMethods.RunCoroutines ( this MonoBehaviour  behaviour,
params IEnumerator[]  tasks 
)
inlinestatic

Run a number of coroutines in sequence.

Parameters
gA GameObject
tasksA IEnumerator[]
Returns
A Coroutine
static Coroutine UniExtensions.MonoBehaviourExtensionMethods.StartCoroutine ( this MonoBehaviour  behaviour,
IEnumerator  task,
System.Action  whenFinished 
)
inlinestatic

Start a coroutine, then run a method when it is finished.

Parameters
taskA IEnumerator The task to run as a couroutine.
whenFinishedA System.Action The action to take when finished.
Returns
A Coroutine
static Coroutine UniExtensions.MonoBehaviourExtensionMethods.StartCoroutine ( this MonoBehaviour  behaviour,
IEnumerator  task,
float  T,
System.Action  onTimeOut 
)
inlinestatic

Run a coroutine, but if it takes too long, abort and call a method.

Returns
A Coroutine

The documentation for this class was generated from the following file: