| | 1 | | using System.Collections; |
| | 2 | | using DCL; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | public class SceneControllerBridge : MonoBehaviour |
| | 6 | | { |
| 0 | 7 | | public void LoadParcelScenes(string payload) { Environment.i.world.sceneController.LoadParcelScenes(payload); } |
| | 8 | |
|
| 0 | 9 | | public void SendSceneMessage(string payload) { Environment.i.world.sceneController.SendSceneMessage(payload); } |
| | 10 | |
|
| | 11 | | public void UnloadScene(string sceneId) |
| | 12 | | { |
| 0 | 13 | | StartCoroutine(AnalyzeLoadingHUDState(sceneId)); |
| 0 | 14 | | } |
| | 15 | |
|
| | 16 | | IEnumerator AnalyzeLoadingHUDState(string sceneId) |
| | 17 | | { |
| 0 | 18 | | if(DataStore.i.HUDs.loadingHUD.fadeIn.Get()) |
| | 19 | | { |
| 0 | 20 | | yield return new UnityEngine.WaitUntil(() => CommonScriptableObjects.isLoadingHUDOpen.Get()); |
| | 21 | |
|
| | 22 | | } |
| 0 | 23 | | Environment.i.world.sceneController.UnloadScene(sceneId); |
| 0 | 24 | | } |
| | 25 | |
|
| 0 | 26 | | public void CreateGlobalScene(string payload) { Environment.i.world.sceneController.CreateGlobalScene(payload); } |
| | 27 | |
|
| 0 | 28 | | public void UpdateParcelScenes(string payload) { Environment.i.world.sceneController.UpdateParcelScenes(payload); } |
| | 29 | |
|
| | 30 | | // TODO: Move to Builder Bridge |
| 0 | 31 | | public void BuilderReady() { UnityEngine.SceneManagement.SceneManager.LoadScene("BuilderScene", UnityEngine.SceneMan |
| | 32 | | } |