- Home /
Basic Questions
Hi guys,there are a few questions that i need to get out of my mind so i thought i would just ask them in one simple question.Thanks
1.What does resizing the game window do?
2.Why is there something like "using resolution ... x ..." and its not following the resolution i added above it?
3.**Most Important**The canvas scaler "scale with screen size".
a)Which reference resolution should I put in?the one i added above or the "using resolution ... x ..."?
b)Match slider (0-1). Could Someone explain this to me,why would someone only want to match the width or height and not match both of them? What value should i put in if i want it to scale sxactly the same on any resolution/aspect ratio?(any android device)
c)What is reference pixel per...?
Answer by tanoshimi · Jul 04, 2015 at 11:47 AM
Adjusts the size of the window in which the game is displayed.
Because the "Game" view needs to fit into the layout of the Unity Editor, it can't always display the exact resolution for which you're building. If you're targetting 1920x1280, but your Game view in the editor is only 300x200px, it will be rescaled accordingly to fit.
a.) The reference resolution is the resolution against which absolutely-placed UI elements will be compared. So if you have a reference resolution of 800x600, and you place an object at 800x600, it will be in the corner of the screen. If your reference resolution was 1600x1200, that object would appear in the centre of the screen. b.) You can't match both of them, because different screens have different height/width ratios.
@tanoshimi 3b)what if I enter 0.5 value.What is the ideal value for scaling to any res and looking the same?
It can't ever look the same. This is not a Unity problem - it's a geometry problem. If I have a painting, let's say, that is 80cm wide by 60cm high. Now let's say I want to make a postcard (15cmx10cm), a beermat (9xmx9cm), and an A4 poster (21cmx29cm) that show the image of that painting.... they won't look the same. They'll either have to stretch the image in some dimension, or have borders ("letterboxing") on the vertical or horizontal edges. That's what the canvas scaler is giving the choice of doing.