How to have text scale properly in Unity for all screen sizes?
Changing the game view in Unity is only useful for checking how the UI looks with different aspect ratios, not different resolutions.
You can control how the UI scales with the Canvas Scaler component (you will find it on the Canvas GameObject): http://docs.unity3d.com/Manual/script-CanvasScaler.html
You will likely want to use the "Scale With Screen Size" mode.
Related videos on Youtube
Anton nelson
Updated on June 04, 2022Comments
-
Anton nelson almost 2 years
So I am making a scene in Unity where I have text, and I have created a canvas and text box and everything... but when I change the size of the game preview window, the size of the text changes too. This makes the text impossible to read on small screens as it is too small! How can I make the text the same size for all screen sizes?
Also, when I change the size of the Game preview window in Unity, is it the same as changing the screen size? Or is it simply scaling everything?
-
Fattie over 7 yearsPossible duplicate of Scaling GUI.TextArea with Screen Size
-
Fattie over 7 yearsIt is critical to select "scale with screen space". In Unity5, Unity accidentally set the WRONG default option on that menu. Until they fix the problem, it is essential to remember to select "scale with screen space". That's the only problem you're having.
-
-
Anton nelson over 8 yearsThanks! That seems to have fixed my problem. Actually, there is a way to change the screen resolution the game window. Click on where it shows your aspect ratio then hit the +. Also, if I look at an app in 16:9 aspect ratio, that is landscape mode. So if I look at it with 9:16 aspect ratio, that is portrait mode. Is my thinking correct?
-
Jan Ivar Z. Carlsen over 8 yearsYes you can enter specific screen resolutions for the game view, but I believe this will still only really affect the aspect ratio. You are indeed correct that 16:9 is landscape and 9:16 is portrait. Any resolution where the width is larger than the height is a landscape resolution, and then of course a resolution where the height is larger than the width is a portrait resolution.
-
Fattie almost 6 yearsfor 2018, it is completely explained here: stackoverflow.com/a/36268018/294884