Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have text scale properly in Unity for all screen sizes?

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?

like image 740
Anton nelson Avatar asked Sep 19 '25 19:09

Anton nelson


1 Answers

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.

like image 105
Jan Ivar Z. Carlsen Avatar answered Sep 22 '25 17:09

Jan Ivar Z. Carlsen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!