Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [EventHandlerAttribute(EventType.DragUpdated)]
- public static void HandleDragUpdated(NodeEditorInputInfo inputInfo)
- {
- if (DragAndDrop.objectReferences[0].GetType() == typeof(SceneAsset))
- {
- DragAndDrop.AcceptDrag();
- DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
- }
- }
- [EventHandlerAttribute(EventType.DragPerform)]
- public static void HandleDragPerform(NodeEditorInputInfo inputInfo)
- {
- inputInfo.SetAsCurrentEnvironment();
- MyNode newNode = Node.Create("myNode", NodeEditor.ScreenToCanvasSpace(inputInfo.inputPos)) as MyNode;
- newNode.someText = DragAndDrop.objectReferences[0].name;
- }
- [EventHandlerAttribute(EventType.DragExited)]
- public static void HandleDragExited(NodeEditorInputInfo inputInfo)
- {
- //This method never gets called??
- Debug.Log("Drag EXITED");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement