The current screen size (according to the stats given by unity) is 966 X 644. When I change the aspect ratio to anything but the current build size and change the size of the game view inside unity, the camera and GUI elements get distorted(its as if the camera’s height changes and the GUI elements are also displaced). This also happens when I build my game and try to run it. How can I make this not happen?
well, for one dont use absolute positioning and scaling, and maybe try it so its not in full screen mode
what are the GUI elements?
You can have qui textures not change size if you set the localScale to 0 and assign pixel inset…
Not sure about other gui elements though.
The GUI elements are buttons and textures. The weird thing is, they are not changing size, just changing where they are relative to the rest of the game. That makes me think the real problem is the camera and its changing height (or at least that is what it looks like). I have this code which is supposed to scale GUI elements(it goes in a GUI function).
GUI.matrix = Matrix4x4.Scale(Vector3(966 * Screen.width, 644 * Screen.height, 1));
What resolution are you using that for?
Are you developing on a netbook?