using System.Runtime.InteropServices;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class BtnAni : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
{
    Button button;

    Vector3 normalScale;
    float change=1.15f;
    private void Awake()
    {
        button = GetComponent<Button>();
        if (button == null ) { button = transform.AddComponent<Button>(); }
        normalScale = button.transform.localScale;

    }
    public void OnPointerEnter(PointerEventData eventData)
    {
        button.transform.localScale = normalScale*change;
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        button.transform.localScale = normalScale;
    }

}
