private void OnTriggerEnter(Collider other) { if (other.tag == "UIButton") { curr_UIButtonIndex = other.GetComponent <UIButtonCollider>().get_index(); if (last_UIButtonIndex != curr_UIButtonIndex) { UIP_script.ButtonHoved(curr_UIButtonIndex); last_UIButtonIndex = curr_UIButtonIndex; } } }