| | 1 | | using System; |
| | 2 | | using UnityEngine; |
| | 3 | | using Environment = DCL.Environment; |
| | 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 | | // sceneNumber comes as a string because WebSocketCommunication can only receive strings as kernel message parameter |
| | 12 | | public void UnloadSceneV2(string sceneNumber) |
| | 13 | | { |
| 0 | 14 | | if (!Int32.TryParse(sceneNumber, out int targetSceneNumber)) |
| | 15 | | { |
| 0 | 16 | | Debug.LogError($"UnloadSceneV2() Int32 failed to parse the received scene number...{sceneNumber}."); |
| 0 | 17 | | return; |
| | 18 | | } |
| | 19 | |
|
| 0 | 20 | | Environment.i.world.sceneController.UnloadScene(targetSceneNumber); |
| 0 | 21 | | } |
| | 22 | |
|
| 0 | 23 | | public void CreateGlobalScene(string payload) { Environment.i.world.sceneController.CreateGlobalScene(payload); } |
| | 24 | |
|
| 0 | 25 | | public void UpdateParcelScenes(string payload) { Environment.i.world.sceneController.UpdateParcelScenes(payload); } |
| | 26 | |
|
| | 27 | | // TODO: Move to Builder Bridge |
| 0 | 28 | | public void BuilderReady() { UnityEngine.SceneManagement.SceneManager.LoadScene("BuilderScene", UnityEngine.SceneMan |
| | 29 | | } |