private void OnTriggerExit(Collider other) { if (other.gameObject.tag == "StartArea") { doorScript.ToggleDoor(); } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "StartArea") { UIOpenDoor doorScript = doorController.GetComponent <UIOpenDoor>(); doorScript.ToggleDoor(); } }