mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
添加引用分析
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user