diff --git a/Engine.Core/Systems/UpdateManager.cs b/Engine.Core/Systems/UpdateManager.cs index 6af1be4..f07ee7b 100644 --- a/Engine.Core/Systems/UpdateManager.cs +++ b/Engine.Core/Systems/UpdateManager.cs @@ -44,6 +44,17 @@ public class UpdateManager : Behaviour, IEnterUniverse, IExitUniverse universe.OnPostUpdate.RemoveListener(OnPostUpdate); } + /// + /// Call the early if it's in queue to be called by this the . + /// It will not be called in the next natural cycle. + /// + /// The instance that will be called now rather than later. + public void CallFirstActiveFrameImmediately(IFirstFrameUpdate instance) + { + if (toCallFirstFrameUpdates.Remove(instance)) + instance.FirstActiveFrame(); + } + private void OnFirstUpdate(IUniverse sender, IUniverse.UpdateArguments args) { for (int i = toCallFirstFrameUpdates.Count - 1; i >= 0; i--)