- Home /
How to adjust the screen resolution?
Hi,
I need to develop a app with a panel. The difficult thing is, that if you open the panel on the left side the panel should not overlay the screen. Instead the viewport (screen resolution) should be reduced as much as the panel is wide.
I already builded a panel that will slide in but it will overlay the screen (viewport). How can I resize the complete screen (viewport) to subtract the panels width?
Can adjust the camera's Rect values, to make it take less of the screen, or slide over. Can play with it in Inspector to get a feel. Works the same way in code.
You asked about resolution. That kind of is. I think most people would say that limits the camera to only part of the screen.
Thank you for the hint. I see the values now in the Inspector. Unfortunately I have a problem with the sizes. The canvas is in pixels but the camera rect values need to be "0.X". What is up there?
That is correct -- sometimes you get sizes in pixels, other times in 0-1 percents. You do have to convert. The best way is to try to work out the math, then do a search. That way you'll understand what they're saying.