using UnityEngine;
using static UnityEngine.GraphicsBuffer;

public class HighlightWhenHover : MonoBehaviour
{
    public GameObject grandmaWithHighlight;
    public GameObject grandmaWithoutHighlight;
    public bool disableOriginal = true;

    void Awake()
    {
        if (grandmaWithHighlight)
        {
            grandmaWithHighlight.SetActive(false);
        }
    }

    void OnMouseEnter()
    {
        if (grandmaWithHighlight)
        {
            grandmaWithHighlight.SetActive(true);
        }
        if (grandmaWithoutHighlight && disableOriginal)
        {
            grandmaWithoutHighlight.SetActive(false);
        }
    }

    void OnMouseExit()
    {
        if (grandmaWithoutHighlight)
        {
            grandmaWithoutHighlight.SetActive(true);
        }
        if (grandmaWithHighlight)
        {
            grandmaWithHighlight.SetActive(false);
        }
    }
}
