Handles Mouse Event Drag not working

Hi, i have an EditorScript, with PositionHandles. Now if I want to detect this:

if(Event.current.type == EventType.MouseDrag)  { // do Something... }

It works if I just hold down the MouseButton and Drag around in SceneView(OnSceneGUI), but it doesn’t detect any Event if I move the PositionHandle.

Could not find anything Related to Handles on the Web… might someone has wisdom about that?

thanks Dan

I think your issue is “where” you actually check that event. Keep in mind that the IMGUI event system is an immediate mode system. Each control that is processed has the opportunity to react or eat the event. Once a control has “eaten” / used (e.Use()) an event it will turn into EventType.Used for all following controls.

So you may just need to put your code above your handles. In some cases you could also try reading the undocumented “rawType” property of the Event class which should still hold the actual event type even some control has used it already.