void OnMouseUp() { tween.Complete(); lastPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); //Debug.LogFormat("onMouseUp != null"); onMouseUp?.Invoke(firstPosition, lastPosition); }
private void OnMouseUp() { PointerEventData ped = new PointerEventData(EventSystem.current); ped.position = Input.mousePosition; bool brelatedUIHit = false; Transform transform; GameObject raycastHitGameObject = ((CustomStandaloneInputModule)EventSystem.current.currentInputModule) .PointerEventDataLeft().pointerEnter; if (raycastHitGameObject != null) { for (int i = 0; i < _relatedUIPanels.Count; i++) { GameObject g = _relatedUIPanels[i]; if (raycastHitGameObject == g) { brelatedUIHit = true; } else { transform = raycastHitGameObject.transform.parent; int count = 0; while (transform != null && count < 1000) { count++; if (transform.gameObject == g) { brelatedUIHit = true; break; } else { transform = transform.parent; } } } } } if (!brelatedUIHit && raycastHitGameObject != null) { return; } if (OnMouseUpEvent != null) { OnMouseUpEvent.Invoke(); } }
public void OnMouseUp() { OnMouseUpEvent.Invoke(); }
void OnMouseUp() { onTrigger.Invoke(gameObject); }