public override void OnPointerExit(UnityEngine.EventSystems.PointerEventData eventData) { base.OnPointerExit(eventData); UnityEngine.EventSystems.EventSystem.current.SetSelectedGameObject(null); if (OnHoverEndAction != null) { OnHoverEndAction.Invoke(); } if (FadeOnHover != null) { if (m_fadeOnHoverTweener != null) { m_fadeOnHoverTweener.Kill(); } m_fadeOnHoverTweener = FadeOnHover.DOFade(0, 0.2f) .OnComplete(() => { FadeOnHover.gameObject.SetActive(false); }); } if (HoverEffect != null) { HoverEffect.SetActive(false); } }
public override void OnPointerEnter(UnityEngine.EventSystems.PointerEventData eventData) { base.OnPointerEnter(eventData); if (OnHoverBeginAction != null) { OnHoverBeginAction.Invoke(); } if (FadeOnHover != null) { if (m_fadeOnHoverTweener != null) { m_fadeOnHoverTweener.Kill(); } FadeOnHover.gameObject.SetActive(true); m_fadeOnHoverTweener = FadeOnHover.DOFade(1, 0.2f); } if (HoverEffect != null) { HoverEffect.SetActive(true); } //AudioModule.Instance.PlayOnHoverBeginSound(); }