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, "BtnTip"); } public void OnPointerEnter(PointerEventData eventData) { if (BtnTip) { BtnTip.gameObject.SetActive(true); } } public void OnPointerExit(PointerEventData eventData) { if (BtnTip) { BtnTip.gameObject.SetActive(false); } } }