Drag and Drop GUI - MouseUp event problem

Hi,

I’m implementing Drag and Drop between different GUI.Windows in my interface. I have the logic I want implemented as a “click-click” action, but I want to implement drag and drop as an improved User Experience.

I have started by Debug.Logging the Event.current.type in order to see what gets fired when, but I can’t make sense of it. I get a MouseDown, then mouseDrag events, which is what I expect. But then, instead of a MouseUp, which I would expect, I get an “Ignore”. Is this something I’ve done wrong, or something wrong with Unity for some reason?

Thanks,
Rich

I’m interested in this topic too, i’m about to start a drag and drop interface of my own.

I’ve figured out the immediate answer to my question above (see below) - but now I need to know how to work around it…

This is what I’ve figured so far: if you drag from window 1, then all the events surrounding window 1 trigger ONLY in window 1. So window 2 (which is supposed to catch the “drop” part of the drag and drop) never gets any events around this action. However, if you drag off window 1, then all the actions after you leave the window come back as EventType.Ignore. This makes some sense, but I can’t figure out how to work around it, or use the functionality as it exists.

Any help?

Furthermore, if you drag from one button in a window to a button that is instantiated after it, then the event appears as EventType.used. Again, this makes sense (to a point) - and looks like it may be the answer to a previous question I asked on here (http://forum.unity3d.com/threads/97434-GUI-Windows-and-clicking-in-3D-space) - but I don’t see how to use it to get the behaviour I need.

Would really appreciate any help anyone can offer here.