internal override SceneLoaderRequestResult Inspection(SceneCollection collection, bool forceNotSuppressible) { List <InternalSceneData> scenesUntilMarked = collection.GetScenesUntilMarked(); bool scenesNotSuppressible = scenesUntilMarked?.Find(scene => scene.IsSuppressible == false) != null; return ((forceNotSuppressible == false && scenesNotSuppressible) ? (SceneLoaderConstants.REQUEST_RESULTS[SceneLoaderReturnType.LoadRejectedUnloadUntilMarkedNotSuppressible]) : (SceneLoaderConstants.REQUEST_RESULTS[SceneLoaderReturnType.Accepted])); }
//=============================================================================// //============ Internal Methods //=============================================================================// #region Internal Methods internal override Queue <InternalSceneRequest> CreateRequests(SceneCollection collection, bool forceNotSuppressible) { if (Inspection(collection, forceNotSuppressible).IsSuccess == false) { Debug.LogError("Development error -- Contact developer -- Initial inspection went wrong, this request should have been denied"); return(null); } Queue <InternalSceneRequest> requests = new Queue <InternalSceneRequest>(); List <InternalSceneData> scenes = collection.GetScenesUntilMarked(); scenes.ForEach(scene => requests.Enqueue(new InternalSceneRequestUnload(scene))); return(requests); }