private void TryClickUIElement(GameObject go) { VRD_UIInteractor buttonTrigger = go.GetComponent <VRD_UIInteractor>() ?? go.GetComponentInParent <VRD_UIInteractor>(); if (buttonTrigger == null) { return; } if (OVRInput.GetDown(buttonTrigger.TargetButton)) { buttonTrigger.ReceiveInput(); } }
private void ClearAnySelectedUIElement() { if (SelectedObject == null) { return; } VRD_UIInteractor buttonTrigger = selectedObject.GetComponent <VRD_UIInteractor>();// ?? SelectedObject.GetComponentInParent<VRD_UIInteractor>(); if (buttonTrigger == null) { return; } buttonTrigger.DoPointerExit(this.gameObject); }
private bool TrySelectUIElement(GameObject go) { if (go == null) { return(false); } VRD_UIInteractor buttonTrigger = go.GetComponent <VRD_UIInteractor>() ?? go.GetComponentInParent <VRD_UIInteractor>(); if (buttonTrigger == null) { return(false); } buttonTrigger.TargetButton = UIInteractionButton; buttonTrigger.DoPointerEnter(this.gameObject); return(true); }