Files
CourierOld/Game/CourierOld/Assets/Code/UI/Panels/Etc/HoverButton.cs
T

16 lines
506 B
C#

using System;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Code.UI.Panels.Etc
{
public class HoverButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public Button button;
public Action OnPointerEnterEvent, OnPointerExitEvent;
public void OnPointerEnter(PointerEventData eventData) => OnPointerEnterEvent?.Invoke();
public void OnPointerExit(PointerEventData eventData) => OnPointerExitEvent?.Invoke();
}
}