Two screenview definitions?

It seems there are two “screen spaces”, while similar are not the same. Working with Unity GUI - The origin (0, 0) is in the top left of the screen. Units are pixels.

Found in Unity - Manual: IMGUI Basics

Now that I’m also working with Input.mousePosition I find as written at Unity - Scripting API: Input.mousePosition

Units are also pixels. The conversion is simple enough but it struck me as odd.

Is there a good reason for this or is it just an oddity?

Most of Unity uses a bottom left origin for screen space, whereas the GUI and GUILayout class use the top left. I assume that the latter was chosen so that GUILayout would flow better for left-to-right, top-to-bottom languages. Unfortunately, this does mean that there are two different coordinate systems, and although converting between the two is simple, it is important that you are aware of which functions use which system.

The split is:

Classes that begin with “GUI”, except GUILayer, GUIElement, GUIText and GUITexture, use the top-left origin.

Everything else uses bottom-left.

That sounds like a plausible explanation. Thanks for the reply.