/// <summary> /// Unity's Update lifecycle /// Will manage the process queue by dequeuing when the scene loader is free and not handling a process. /// When a scene loader is handling a process, it will manage event of Start and Finish of the process. /// It will internally call update on the current process. /// </summary> private void Update() { // If there is a process currently handle call the update on it // If the current process has ended, call the event to specify that the process ended // and set the process currently handed to null (allowing the scene loaded to handle a new one) if (_currentProcess != null) { _currentProcess.UpdateProcess(); if (_currentProcess.ProcessFinish) { SceneLoaderEvents.TriggerOnLoaderProcessFinish(); _currentProcess = null; } } }