Beispiel #1
0
        private void Restart()
        {
            AssetID    sceneID = "Scenes/" + _sls.LoadedScene.Name + ".scene";
            SceneAsset scene   = _as.Database.LoadAsset <SceneAsset>(sceneID, cache: false);

            CinematicCamera.SkipCinematicCamera = true;
            _sls.LoadScene(scene);
        }
Beispiel #2
0
        protected virtual void LoadLevel()
        {
            if (DisableCinematicCameraEffect)
            {
                CinematicCamera.SkipCinematicCamera = true;
            }

            SceneAsset scene = _assetSystem.Database.LoadAsset(LoadedScene, cache: false);

            _sls.LoadScene(scene);
        }
Beispiel #3
0
        private void DrawPlayPage()
        {
            foreach (var kvp in PlayerStageProgress.Instance.Stages)
            {
                if (DrawSceneOptionLabel(kvp.Key, kvp.Value))
                {
                    AssetID sceneID = _allScenes.FirstOrDefault(id => id.Value.Contains(kvp.Key));
                    if (sceneID.IsEmpty)
                    {
                        throw new InvalidOperationException("No scene was found with the name " + kvp.Key);
                    }

                    _sls.LoadScene(_assetSystem.Database.LoadAsset <SceneAsset>(sceneID, false));
                }
            }
        }