private void OnTriggerExit(Collider other) { if (other.gameObject.GetComponent <AdvancedButton>() != null) { button = other.GetComponent <AdvancedButton>(); // TODO: @msaw - if we dont need the trigger enter on the button and finger we can work around this //button.OnTriggerExits(colliderEventData); } }
private void OnTriggerEnter(Collider other) { //Debug.Log(other.gameObject.name); if (other.gameObject.GetComponent <AdvancedButton>() != null) { Debug.Log("is advanced button"); try { button = other.GetComponent <AdvancedButton>(); TouchButton.Invoke(); //button.OnSelect(eventDataB); //button.OnPointerEnter(eventDataP); colliderEventData = new ColliderEventData(this.gameObject, button.gameObject); // TODO: @msaw - if we dont need the trigger enter on the button and finger we can work around this //button.OnTriggerEnters(colliderEventData); } catch (System.Exception ex) { Debug.Log(ex); } } if (other.gameObject.name == "OpenUITrigger") { // open the 3d UI if (MainMenu != null) { OpenMainMenu(); } //MainMenue.Open(); Debug.Log("OpenUITrigger collision detected"); } }