添加引用分析

This commit is contained in:
Molth Nevin
2025-05-26 15:07:50 +08:00
parent c6f1508e84
commit 32c1edd0a5
21 changed files with 1252 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using UnityEditor;
using UnityEngine;
namespace TEngine.Editor
{
internal sealed class DragAreaGetObject
{
public static Object[] GetObjects(string meg = null)
{
Event aEvent = Event.current;
GUI.contentColor = Color.white;
if (aEvent.type is EventType.DragUpdated or EventType.DragPerform)
{
DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
bool needReturn = false;
if (aEvent.type == EventType.DragPerform)
{
DragAndDrop.AcceptDrag();
needReturn = true;
}
Event.current.Use();
if (needReturn) return DragAndDrop.objectReferences;
}
return null;
}
}
}