I have an instance where I am dragging things around in the editor window and it relies on the EventType.MouseUp signal to release the dragging function. Which works just fine if the user keeps the pointer inside the editor window. But if the user drags outside the editor window and release the mouse it doesn’t send the MouseUp event to finish the dragging code. How do I get around this?
Well, where does the mouse end up?
I solved this a few times, but I can’t remember if I had a more elegant solution solution than: Listen to EditorWindow.Update and if the mouse isn’t within the window and drag has started then end it.
Listening to window update isnt usually that expensive but if you wanted you could register the listener when drag starts and deregister when it stops.