Anton nelson
Anton nelson

Reputation: 333

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?

Upvotes: 4

Views: 15790

Answers (1)

Jan Ivar Z. Carlsen
Jan Ivar Z. Carlsen

Reputation: 345

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.

Upvotes: 5

Related Questions