예제 #1
0
        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]));
        }
예제 #2
0
        //=============================================================================//
        //============ 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);
        }