Multi selection of grid values in a custom Editor Window.

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)

       case EventType.MouseUp :
       endVector = grid1.GetValue(mousePos)

Silly me… Just needed to store a Vector2 for the grid position on EventType.MouseDown, and then store a second Vector2 for EventType.MouseUp.

hello i want to do this type of work but i’m new and i’m struggling. can you share codes?