Calls the given action on the next scripting update. The action to invoke.
(Action action)
| 114 | /// </summary> |
| 115 | /// <param name="action">The action to invoke.</param> |
| 116 | public static void InvokeOnUpdate(Action action) |
| 117 | { |
| 118 | lock (UpdateActions) |
| 119 | { |
| 120 | UpdateActions.Add(action); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | /// <summary> |
| 125 | /// Queues the specified work to run on the main thread and returns a <see cref="T:System.Threading.Tasks.Task" /> object that represents that work. |