/// <summary>Invoke the given action in the given amount of seconds</summary> /// <param name="mb">The MonoBehaviour to run this from.</param> /// <param name="actionToStart">The given action to invoke</param> /// <param name="secondsToWait">The amount to wait before action, in seconds</param> public static Coroutine ActionInSeconds(this MonoBehaviour mb, Action actionToStart, float secondsToWait) { return(mb.ActiveInHierarchy() ? mb.StartCoroutine(mb.ActionInSecondsCoroutine(actionToStart, secondsToWait)) : null); }