Hello,
When a user switches to a screen resolution, lower than a predefined value, we scale down the whole UI using GUI.Matrix. Everything shows up fine, but when GUI.Window is used, gui elements with Hover style detect mouse incorrectly. Also Rect.Contains(…) starts working incorrectly.
Setting the matrix:
Vector3 scale = Vector3.zero;
scale.z = 1;
scale.y = Screen.height < 1024 ? Screen.height/1024 : 1;
scale.x = scale.y;
GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, scale);
This started happening after upgrading from Unity 4.1.0 to 4.2.0. I noticed there is a new GUI.ModalWindow from 4.1.2, which when used, does not produce the above problems as GUI.Window. However using GUI.ModalWindow is not always possible.
This seems like a big problem, especially for Unity games run on game portals, where the resolution is really low by default.
Anyone bumbed into this?
Thanks in advance