Newer
Older
TheVengeance-Project-IADE-Unity2D / Assets / Scripts / UI / ButtonManegement.cs
@Rackday Rackday on 18 Aug 622 bytes Project Added
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class ButtonManegement : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
    private Text text;

    // Start is called before the first frame update
    void Start()
    {
        text = GetComponentInChildren<Text>();
    }


    public void OnPointerEnter(PointerEventData eventData)
    {
        text.color = Color.red; //Or however you do your color
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        text.color = Color.black;
    }

}