123456789101112131415161718192021222324252627282930 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.EventSystems;
- using XRTool.Util;
- public class ShowBtnTip : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
- {
- private Transform BtnTip;
- private void Awake()
- {
- BtnTip = UnityUtil.GetBreadthChild<Transform>(transform, "BtnTip");
- }
- public void OnPointerEnter(PointerEventData eventData)
- {
- if (BtnTip)
- {
- BtnTip.gameObject.SetActive(true);
- }
- }
- public void OnPointerExit(PointerEventData eventData)
- {
- if (BtnTip)
- {
- BtnTip.gameObject.SetActive(false);
- }
- }
- }
|