void OnTriggerExit(Collider other) { if (button != null && other.gameObject == button.gameObject) { button.UnHighlight(); button = null; } }
void OnTriggerEnter(Collider other) { if (button == null) { HostButtonScript otherButton = other.GetComponent <HostButtonScript>(); if (otherButton != null) { button = otherButton; button.Highlight(); } } }