MonoBehaviourExtensions.Wait<T>

Extension Method in MonoBehaviourExtensions

Declaration

public static Coroutine Wait<T>(this MonoBehaviour behavior, float delay, Action<T> action, T obj)

Description

Executes an action after a delay.

Type Parameters

TThe type of the object to pass to the action.

Parameters

behaviorThe behavior to execute the action on.
delayThe delay in seconds.
actionThe action to execute.
objThe object to pass to the action.

Returns

CoroutineThe coroutine.