- Home /
Question by
Jeff-Kesselman · Jul 16, 2014 at 11:24 PM ·
editorevent
Detect mouse up or end of drag on any scene object
I've been fighting for the better part of a day to get the equivalent of Input.MouseUp(0) in the Editor/scene view.
Basically I need to know when a drag on the root object that contains a scripted object has ended.
The closest Ive come is using a custom Editor on the scripted object but it does not get the events unless it itself is selected and I need it to get an event when the drag of its root is done.
THis is the custom editor solution...
public class MagnetEditor : Editor {
public void OnSceneGUI () {
Debug.Log ("Event="+Event.current);
if (Event.current.type == EventType.MouseUp){
Debug.Log ("Mouse UP");
}
}
}
Help?
Comment