using System.Collections; using System.Collections.Generic; using UnityEngine; #if ENABLE_INPUT_SYSTEM && UNITY_INPUT_SYSTEM_PACKAGE using UnityEngine.InputSystem; #endif namespace MuHua { /// /// UI工具 /// public static class UITool { /// 获取鼠标位置 public static Vector3 GetMousePosition() { #if ENABLE_INPUT_SYSTEM && UNITY_INPUT_SYSTEM_PACKAGE return Mouse.current.position.ReadValue(); #else return Input.mousePosition; #endif } } }