I have two grids in a custom editor window. I’m trying to find the best way to detect 2 values for when the mouse is clicked down, and when it’s released. For example, I click on 0,0 and release on 1,0.
I’m using something similar to this in OnGUI();
Event e = Event.current;
EventType et = e.type;
mousePos = e.mousePosition;
switch (et)
{
case EventType.MouseDown :
startVector = grid1.GetValue(mousePos)
break;
case EventType.MouseUp :
endVector = grid1.GetValue(mousePos)
break;
}