Get Inspector Rect

Hello, is there anyway to find the Rectangle of the inspector? specifically, its position?

I’m trying to show an EditorWindow.ShowAsDropDown after I press a button in my Custom Editor.
However, using GUILayoutUtility.GetLastRect returns a rect in local coordinates. EditorWindow.ShowAsDropDown expects a screen position.

I don’t see how I can find the screen position of my button without knowing the position of its parent container.

fail

EditorGUIUtility.GUIToScreenPoint

1 Like