public void OnPointerEnter(PointerEventData eventData) { if (eventData == null) { return; } OnObserver = eventData.pointerEnter.GetComponent <TPTooltipObserver>(); _eventData = eventData; if (EnterObserver != null) { EnterObserver(); } SetActive(true); if (OnObserver == null) { return; } if (OnObserver.SetType == TPTooltipObserver.ToolTipType.DynamicEnter || OnObserver.SetType == TPTooltipObserver.ToolTipType.DynamicClick) { StartCoroutine(ToolTipPositioning()); } else { TooltipLayout.PanelTransform.position = StaticTransform.position; } }
public void OnPointerExit(PointerEventData eventData) { OnObserver = null; _eventData = null; if (ExitObserver != null) { ExitObserver(); } SetActive(false); }