/// <summary>Invoke the given action after the given amount of render frames</summary> /// <param name="mb">The MonoBehaviour to run this from.</param> /// <param name="actionToStart">The given action to invoke</param> /// <param name="framesToWait">The amount to wait before action, in frames</param> public static Coroutine ActionInFrames(this MonoBehaviour mb, Action actionToStart, int framesToWait) { return(mb.ActiveInHierarchy() ? mb.StartCoroutine(mb.ActionInFramesCoroutine(actionToStart, framesToWait)) : null); }