////////////////////////////////////////////////////////////////////////// protected override void OnInteract() { // Press button Button button = GetButton(); if (button != null) { var pointer = new PointerEventData(EventSystem.current); // pointer event for Execute button.OnPointerClick(pointer); return; } #if ACCESS_NGUI UIButton nGUIButton = GetNGUIButton(); if (nGUIButton != null) { nGUIButton.SendMessage("OnPress", true, SendMessageOptions.DontRequireReceiver); nGUIButton.SendMessage("OnPress", false, SendMessageOptions.DontRequireReceiver); nGUIButton.SendMessage("OnClick", SendMessageOptions.DontRequireReceiver); return; } else { UIEventTrigger nGUITrigger = GetNGUIEventTrigger(); if (nGUITrigger != null) { nGUITrigger.SendMessage("OnPress", true, SendMessageOptions.DontRequireReceiver); nGUITrigger.SendMessage("OnPress", false, SendMessageOptions.DontRequireReceiver); nGUITrigger.SendMessage("OnClick", SendMessageOptions.DontRequireReceiver); return; } } #endif }