| | 1 | | using DCL.Helpers; |
| | 2 | | using DCL.Models; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL.Controllers |
| | 6 | | { |
| | 7 | | public class GlobalScene : ParcelScene |
| | 8 | | { |
| | 9 | | [System.NonSerialized] |
| | 10 | | public bool isPortableExperience = false; |
| | 11 | |
|
| | 12 | | [System.NonSerialized] |
| | 13 | | public string iconUrl; |
| | 14 | |
|
| 0 | 15 | | protected override string prettyName => $"{sceneData.id}{ (isPortableExperience ? " (PE)" : "") }"; |
| | 16 | |
|
| 0 | 17 | | public override bool IsInsideSceneBoundaries(Vector3 worldPosition, float height = 0f) { return true; } |
| | 18 | |
|
| 2 | 19 | | public override bool IsInsideSceneBoundaries(Vector2Int gridPosition, float height = 0) { return true; } |
| | 20 | |
|
| | 21 | | public override void SetData(LoadParcelScenesMessage.UnityParcelScene data) |
| | 22 | | { |
| 1 | 23 | | this.sceneData = data; |
| | 24 | |
|
| 1 | 25 | | contentProvider = new ContentProvider(); |
| 1 | 26 | | contentProvider.baseUrl = data.baseUrl; |
| 1 | 27 | | contentProvider.contents = data.contents; |
| 1 | 28 | | contentProvider.BakeHashes(); |
| | 29 | |
|
| 1 | 30 | | if (DCLCharacterController.i != null) |
| 1 | 31 | | gameObject.transform.position = PositionUtils.WorldToUnityPosition(Utils.GridToWorldPosition(data.basePo |
| | 32 | |
|
| 1 | 33 | | DataStore.i.sceneWorldObjects.AddScene(sceneData.id); |
| 1 | 34 | | } |
| | 35 | |
|
| 0 | 36 | | protected override void SendMetricsEvent() { } |
| | 37 | | } |
| | 38 | | } |