GUI image displayed too large, why other scenes suddenly incredibly small?
This question is a bit similar to another question I have posted, but this is about the GUI system.
I have a Unity project with player resolution of 800x600. My background image is also 800x600.
Now I have created a game scene where I display the sprite at scale 1. This displays the image too small so I have to fiddle with the camera settings to try and fit the 800x600 image into the screen which is also 800x600 pixels. This seems very unwieldy to me, but apparently this is how Unity works?
The new problem comes from adding a GUI scene. This scene contains a GUI image, again at 800x600 resolution. This time, surprisingly, the image is displayed too large, and again I have to fiddle with settings to get a 800x600 image to display at 800x600 resolution.
My question: what am I missing here? I thought that the GUI system is always just 100% of its native resolution? It still seems to screw around with display sizes.
The other question is: when switching between the GUI scene and the regular game scene, the game scene is suddenly displayed VERY VERY tiny (about 10x10 pixels). I have to zoom in to about 1000% percent to even see the game scene.
This problem occurs as soon as I add a GUI scene to my project.
Is this a bug in Unity or should I update some settings somewhere?
Answer by KlausJoensuu · Aug 29, 2015 at 01:53 PM
It is because you're gui is make by pixels, try using screen.width and screen.height for the size. If too big then add a minus sign and a amount.
And where can I adjust the size of the GUI? The width and height settings are greyed out.
You will half to use code. For size in code just use the screen.height and screen.width
Your answer
![](https://koobas.hobune.stream/wayback/20220612001913im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Store values between scenes 0 Answers
Script is detecting input with ZERO actions 0 Answers
How do i create a scene variable? 3 Answers
Main Menu Help 2 Answers
help to fix bug with using GUIUtility.RotateAroundPivot + GUI.DrawTexture 1 Answer