void Awake() { if (instance == null){ instance = this; rotationMarkerMapping = new Dictionary<RotationMarker, Transform>(); shipGameplayCamera = CameraManager.Instance.ShipGameplayCamera; canvas = GetComponent<Canvas>(); } else{ Destroy(this.gameObject); Debug.Log("Destroyed duplicate instance of RotationMarkerManager"); } }
void Awake() { if (instance == null) { instance = this; rotationMarkerMapping = new Dictionary <RotationMarker, Transform>(); shipGameplayCamera = CameraManager.Instance.ShipGameplayCamera; canvas = GetComponent <Canvas>(); } else { Destroy(this.gameObject); Debug.Log("Destroyed duplicate instance of RotationMarkerManager"); } }