挂在需要跟随鼠标的UI上(Image,Text等)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIFollowMouse : MonoBehaviour
{
/// <summary>
/// 需要跟随的物体
/// </summary>
private GameObject go;
private void Awake()
{
go = gameObject;
}
private void OnEnable()
{