Ejemplo n.º 1
0
        internal override SceneLoaderRequestResult Inspection(SceneCollection collection, bool forceNotSuppressible)
        {
            List <InternalSceneData> allScenes = collection.GetAllScenes(false);
            bool scenesNotSuppressible         = allScenes?.Find(scene => scene.IsSuppressible == false) != null;

            return
                ((forceNotSuppressible == false && scenesNotSuppressible)
                    ? (SceneLoaderConstants.REQUEST_RESULTS[SceneLoaderReturnType.LoadRejectedUnloadAllNotSuppressible])
                    : (SceneLoaderConstants.REQUEST_RESULTS[SceneLoaderReturnType.Accepted]));
        }
Ejemplo n.º 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.GetAllScenes(false);

            scenes.ForEach(scene => requests.Enqueue(new InternalSceneRequestUnload(scene)));

            return(requests);
        }