| | 1 | | using DCL.Helpers; |
| | 2 | | using UnityEngine; |
| | 3 | |
|
| | 4 | | namespace DCL |
| | 5 | | { |
| | 6 | | public class InitialSceneReferences : MonoBehaviour |
| | 7 | | { |
| | 8 | | [SerializeField] private MouseCatcher mouseCatcherReference; |
| | 9 | | [SerializeField] private GameObject groundVisualReference; |
| | 10 | |
|
| 0 | 11 | | public GameObject groundVisual { get { return groundVisualReference; } } |
| 0 | 12 | | public MouseCatcher mouseCatcher { get { return mouseCatcherReference; } } |
| | 13 | |
|
| 1 | 14 | | public static InitialSceneReferences i { get; private set; } |
| | 15 | |
|
| | 16 | | void Awake() |
| | 17 | | { |
| 0 | 18 | | if (i != null) |
| | 19 | | { |
| 0 | 20 | | Utils.SafeDestroy(this); |
| 0 | 21 | | return; |
| | 22 | | } |
| | 23 | |
|
| 0 | 24 | | i = this; |
| 0 | 25 | | } |
| | 26 | |
|
| 0 | 27 | | void OnDestroy() { i = null; } |
| | 28 | | } |
| | 29 | | } |