Exemplo n.º 1
0
        private void Start()
        {
            SceneDataBundle bundleToLoad = null;

            if (_overrideSceneToLoad != null)
            {
                bundleToLoad = _overrideSceneToLoad;
            }
            else if (_loadSceneAtStart)
            {
                List <SceneData> scenesList = new List <SceneData>()
                {
                    new SceneData(_sceneToLoadAtStartName, _sceneToLoadAtStartIsMarked, _sceneToLoadAtStartIsSuppressible)
                };
                bundleToLoad = new SceneDataBundle(scenesList, _sceneToLoadAtStartBundleIdentifier, new List <string>()
                {
                    _sceneToLoadAtStartName
                });
            }

            if (bundleToLoad != null)
            {
                SceneLoaderRequest request = new SceneLoaderRequestLoad(bundleToLoad, new UnloadStrategyAll());
                _sceneLoaderProxy.PostRequest(request);
            }
        }
Exemplo n.º 2
0
        public SceneLoaderRequestLoad(List <SceneData> scenes, UnloadStrategy unloadStrategy = null, SceneLoaderProxy.SceneLoaderRequestCallback callback = null, bool forceNotSuppressible = false) :
            base(callback, forceNotSuppressible)
        {
            SceneDataBundle asBundle = new SceneDataBundle(scenes, null, null);

            _bundle         = asBundle;
            _unloadStrategy = unloadStrategy ?? new UnloadStrategyNone();
        }
Exemplo n.º 3
0
        public SceneLoaderRequestLoad(List <string> scenesName, UnloadStrategy unloadStrategy = null, SceneLoaderProxy.SceneLoaderRequestCallback callback = null, bool forceNotSuppressible = false) :
            base(callback, forceNotSuppressible)
        {
            List <SceneData> asSceneDataList = scenesName.ConvertAll(sceneName => new SceneData(sceneName));
            SceneDataBundle  asBundle        = new SceneDataBundle(asSceneDataList, null, null);

            _bundle         = asBundle;
            _unloadStrategy = unloadStrategy ?? new UnloadStrategyNone();
        }
Exemplo n.º 4
0
        public SceneLoaderRequestLoad(SceneData scene, UnloadStrategy unloadStrategy = null, SceneLoaderProxy.SceneLoaderRequestCallback callback = null, bool forceNotSuppressible = false) :
            base(callback, forceNotSuppressible)
        {
            List <SceneData> asSceneDataList = new List <SceneData>()
            {
                scene
            };
            SceneDataBundle asBundle = new SceneDataBundle(asSceneDataList, null, new List <string>()
            {
                scene.SceneName
            });

            _bundle         = asBundle;
            _unloadStrategy = unloadStrategy ?? new UnloadStrategyNone();
        }
Exemplo n.º 5
0
        //=============================================================================//
        //============ Lifecycle Methods
        //=============================================================================//.
        #region Lifecycle Methods

        protected override void Awake()
        {
            base.Awake();
            _overrideSceneToLoad = null;
            _onSceneManagerReady?.Invoke();
        }
Exemplo n.º 6
0
        //=============================================================================//
        //============ Public Methods
        //=============================================================================//.
        #region Public Methods

        public void ModifySceneToLoadAtStart(SceneDataBundle sceneBundle)
        {
            _overrideSceneToLoad = sceneBundle;
        }
Exemplo n.º 7
0
 public SceneLoaderRequestLoad(SceneDataBundle bundle, UnloadStrategy unloadStrategy = null, SceneLoaderProxy.SceneLoaderRequestCallback callback = null, bool forceNotSuppressible = false) :
     base(callback, forceNotSuppressible)
 {
     _bundle         = bundle;
     _unloadStrategy = unloadStrategy ?? new UnloadStrategyNone();
 }