- Home /
Unity 5 UI, Screen Resolution and Ratio
Hey everyone,
I am wondering how can I configure my UI to have the same size on screen no matter the resolution.
Let's imagine I have a button and I want it to take 2cm on my screen. How should I configure my Canvas, and maybe other components, so that it always takes 2cm no matter the screen resolution.
The next question concerns the design on the UI images, would you design them at full resolution ? What would be your workflow concerning the creation of the UI textures and sprites ?
Thank you.
Answer by EnriqueL · Oct 28, 2015 at 11:01 AM
Once you create your canvas, you will see a canvas in which you can select the render Mode more info here here you can select the way you want that canvas to be drawn. I recommend to use the "Screen space - Camera" so it scales with the camera reference. Below the Canvas you will see the Canvas Scaler, here you can select who the canvas scales in relation with what you want, if you want to have always the same size use the constant physical scale, then you can select the physical unit to cm.
And for the UIImages, it depends on how many do you have, it's always better have on the exact resolution that it will be displayed, that way you don't have to interpolate them, but it increases the project size, and the memory needed. I recommend you to work using power of 2 image size, so unity can compress the images, and try to create spritesheets using something like texturePackager
hope it works
Your answer
Follow this Question
Related Questions
Problem with build version 1 Answer
Application crashs when I'm using UI in Unity5.0.1 1 Answer
Canvas with GUI elements in prefab act strangely 0 Answers
UI working fine in editor but glitched in standalone builds 1 Answer
Unity UI Text with markup tags - “String too long for TextMeshGenerator” 0 Answers