Class GameObjectExtensions
Extensions for 'UnityEngine.GameObject'.
Inheritance
System.Object
GameObjectExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UnityEngine
Assembly: cs.temp.dll.dll
Syntax
public static class GameObjectExtensions
Methods
CreateTaskRunner(GameObject, TaskRunOptions)
Create a
Declaration
public static ITaskRunner CreateTaskRunner(this GameObject gameObject, TaskRunOptions options = TaskRunOptions.Default)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | GameObject to create the task-runner on. |
TaskRunOptions | options | Options for configuring how tasks are run on this runner. |
Returns
Type | Description |
---|---|
ITaskRunner | Newly created |
Remarks
If you run tasks on the returned runner then they are cancelled automatically when the gameobject is destroyed.
Can only be called from the unity-thread in play-mode.
Exceptions
Type | Condition |
---|---|
NotPlayingException | Thrown when called in edit-mode. |
NonUnityThreadException | Thrown when called from a non-unity thread. |