Summary
[Editor-Only]
Delegate for validating and responding to
UnityEditor.DragAndDrop
operations.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.Editor - Base Types
-
- MulticastDelegate
graph BT
Type-->Base0["MulticastDelegate"]
Type["DragAndDropHandler<T>"]
class Type type-node
Syntax
public delegate bool DragAndDropHandler<T>(T dragging, bool isDrop) : MulticastDelegate
where T : class
Remarks
Example:
private DragAndDropHandler<AnimationClip> _AnimationDropHandler;
void OnGUI(Rect area)
{
_AnimationDropHandler ??= (clip, isDrop) =>
{
if (clip.legacy)// Reject legacy animations
return false;
if (isDrop)// Only act when dropping.
Debug.Log(clip + " was dropped");
return true;// Drag or drop is accepted.
};
_AnimationDropHandler.Handle(area);
}
Type Parameters
Name | Description |
---|---|
T |
Extension Methods
Name | Value | Summary |
---|---|---|
Handle |
bool |
Handles the current event.
From AnimancerGUI
|
Handle |
bool |
Handles the current event.
From AnimancerGUI
|