When I resize the inspector panel of holding the MonoBehaviour, the output produced through the context-menu click changes to match the size of the inspector panel (I believe).
Mmkay. Seems like Camera.pixelHeight and pixelWidth are the correct values to use. I think there’s even some Unity learning material that should be changed to use these values instead of Screen.width/height. I’m pretty sure that’s where i picked up the habit of using Screen.XXXX values years ago.
Yes it seems to be by design. Screen returns the state of the current rendering context (which is the inspector in this case). Much of the editor and many 3rd-party editor extensions rely on this behavior. However, I agree that the API is a bit vague about what it should be used for. We’ve been looking into a better solution for this API.