-
Notifications
You must be signed in to change notification settings - Fork 341
Expand file tree
/
Copy pathEditorGUILayoutExtension_DragDropArea.cs
More file actions
81 lines (72 loc) · 3.46 KB
/
EditorGUILayoutExtension_DragDropArea.cs
File metadata and controls
81 lines (72 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#region 注 释
/***
*
* Title:
*
* Description:
*
* Date:
* Version:
* Writer: 半只龙虾人
* Github: https://github.com/HalfLobsterMan
* Blog: https://www.crosshair.top/
*
*/
#endregion
using UnityEditor;
using UnityEngine;
using UnityObject = UnityEngine.Object;
namespace CZToolKit.Core.Editors
{
public static partial class EditorGUILayoutExtension
{
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject[] DragDropAreaMulti(params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaMulti(rect);
}
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject[] DragDropAreaMulti(DragAndDropVisualMode _dropVisualMode, params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaMulti(rect, _dropVisualMode);
}
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject[] DragDropAreaMulti(Color _hightlightColor, params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaMulti(rect, _hightlightColor);
}
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject[] DragDropAreaMulti(DragAndDropVisualMode _dropVisualMode, Color _hightlightColor, params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaMulti(rect, _dropVisualMode, _hightlightColor);
}
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject DragDropAreaSingle(params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaSingle(rect);
}
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject DragDropAreaSingle(DragAndDropVisualMode _dropVisualMode, params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaSingle(rect, _dropVisualMode);
}
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject DragDropAreaSingle(Color _hightlightColor, params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaSingle(rect, _hightlightColor);
}
/// <summary> 绘制一个可接收拖拽资源的区域 </summary>
public static UnityObject DragDropAreaSingle(Rect _rect, DragAndDropVisualMode _dropVisualMode, Color _hightlightColor, params GUILayoutOption[] _options)
{
Rect rect = GUILayoutUtility.GetRect(new GUIContent(), GUI.skin.label, _options);
return EditorGUIExtension.DragDropAreaSingle(rect, _dropVisualMode, _hightlightColor);
}
}
}