I'd appreciate it if someone could show me how to create a custom editor that will display the mouse position in the inspector when the left mouse button is released in the Scene View.
I've tried for an hour or so but I must be missing something.
This works to catch mouse down. Mouse up doesn't come through though -- looks like the scene view already swallowed it. I do get mouse up for the right button though, if that helps.
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(Transform))]
public class EditorTempTest : Editor
{
void OnSceneGUI()
{
if (Event.current.type == EventType.MouseDown)
{
Debug.Log(Event.current.mousePosition);
}
}
}