赞
踩
关键词:unity鼠标移动,ui显示
文字等提示信息
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class Test_ItemTooltip : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler
{
public GameObject go;
public void OnPointerDown(PointerEventData eventData)
{
}
/// <summary>
/// 进入触发显示物品信息
/// </summary>
/// <param name="eventData"></param>
public void OnPointerEnter(PointerEventData eventData)
{
go.SetActive(true);
go.GetComponent<RectTransform>().position = new Vector3(Input.mousePos
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。