private void ValidateInstance() { if (_instance != null && _instance != this) { Debug.Log("There were multiple MiraController instances in your scene, destroying one"); Destroy(this.gameObject); } else { _instance = this; } }
private void Start() { cameraTransform = cameraPlayer.transform; playerMira = GetComponent <MiraController>(); }