Hello. I developed my game's GUI using absolute positions. At the 3:2 aspect ratio, everything looks fine. But, because I used absolute positions, any other resolution does not work properly with the GUI. Rather than go back and replace all of the GUI elements with relative positions manually, I was told Unity is able to do it automacily using this code. But I dont understand exactly what the person who posted the code meant, can someone please elaborate on it(here is the code and the persons explanation)?
Vetor3 scale = new Vector3(origWidth
/Screen.width, origHeight /
Screen.height, 1); GUI.matrix
=Matrix4x4.Scale(scale);
where origWidth and origHeight is the screen size you used when designing the gui you can design you gui in the editor, using a good screen size (e.g. 1920x1200) using absolute positions like you would normally do. Then all you have to do is tell the script the original used screen size and will do the scaling for you. No extra code needed.