27 lines
568 B
C#
27 lines
568 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class Reveal : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|
{
|
|
public Text test;
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
print("鼠标进入");
|
|
test.gameObject.SetActive(true);
|
|
}
|
|
|
|
public void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
print("鼠标退出");
|
|
test.gameObject.SetActive(false);
|
|
}
|
|
}
|