What is the easiest way to get mouse move events in inspectors?

I want to implement my own simplistic atlas editor in the inspector window. How do I get the relevant mouse move events?

There seems to be a property called EditorWindow.wantsMouseMove, but I don’t know how to set this for my particular inspector view.

http://forum.unity3d.com/threads/134399-What-is-the-easiest-way-to-get-mouse-move-events-in-inspectors

You can’t set wantsMouseMove in Editors since it’s a property of EditorWindow. The whole editor is usually completly event driven. However mousemove events seems to not trigger the OnGUI / OnInspectorGUI callback, probably for performance reasons.

For what reason do you need mousemove events? Mousedrag-events are usually generated in all kind of windows. Also do you talk about mousemove events in the custom editor (inspector) itself, or in the scene view like the terrain editor?

The Terrain editor for example uses OnInspectorUpdate to repaint the whole inspector window when neccessary.

private void OnInspectorUpdate()
{
    if (EditorUtility.hasAnyNewPreviewTexturesAvailable)
    {
        base.Repaint();
    }
}

There are many ways to react to certain events.

I’m not sure when this got added exactly, but for Inspectors you can now just:

	public override bool RequiresConstantRepaint()
	{
		return true;
	}