【m】框架大更新

This commit is contained in:
2025-10-31 11:18:23 +08:00
parent ae6e7c804b
commit 8e1d52ddbf
1883 changed files with 213934 additions and 640 deletions

View File

@@ -0,0 +1,30 @@
#if UNITY_2019_4_OR_NEWER
using System.Reflection;
using UnityEditor;
namespace YooAsset.Editor
{
public static class UIElementsCursor
{
private static PropertyInfo _defaultCursorId;
private static PropertyInfo DefaultCursorId
{
get
{
if (_defaultCursorId != null)
return _defaultCursorId;
_defaultCursorId = typeof(UnityEngine.UIElements.Cursor).GetProperty("defaultCursorId", BindingFlags.NonPublic | BindingFlags.Instance);
return _defaultCursorId;
}
}
public static UnityEngine.UIElements.Cursor CreateCursor(MouseCursor cursorType)
{
var ret = (object)new UnityEngine.UIElements.Cursor();
DefaultCursorId.SetValue(ret, (int)cursorType);
return (UnityEngine.UIElements.Cursor)ret;
}
}
}
#endif