Setting up camera and canvas in editor

Hi All

Im brand new to Unity and I’m tearing my hair out trying to get my head around the first step of setting up my project and work space.

I want to set the editor up to work with my full res x4 assets which are designed for the ipad with a resolution of 2048 x 1536 px so I want my editor camera / UI canvas to reflect this, so that when I drag images / sprites from my assets folder, they appear exactly as they would on the device, I figured this would be an intuitive starting point and ensure that I position my UI and game objects correctly from the get go, ie as I see them in photoshop and other Image editing applications.

However After scratching my head for 2 days as to why my canvas was super large and the assets were either tiny or massive when dragged onto the canvas, I finally discovered the obscure wonders of PPU which is currently set to the default of 100

So Ive set my main camera up to

Orthographic

Size (7.68)
Viewport rect (W 4 H 3) (Im assuming this is the aspect ratio as its not very clear)

And my canvas to

Render mode (screenspace - Camera)
Render camera - (Main Camera)

Canvas scaler (scale with screen size)

reference resolution (2048 x 1536)

My Question is will this set up allow my game / UI to scale to other screen sizes when they run on the actual device. or am I stuck with the 2048 x 1536 resolution ?

The whole point of the Canvas Scaler is that your game will scale to other screen sizes, so I think you should be good.

But it’s not hard to test if you can make a standalone build for Win/Mac/Linux. Go to player settings for standalone, in the Resolution and Presentation group, click the box for “Resizable Window”. Then when you make a build, you’ll be able to resize the window while running just by grabbing the corner and dragging. Watch how your UI changes as a result!

1 Like

Thanks Antistone Thats put my mind at rest a bit, Im having a lot of trouble getting my head around the Unity UI system and recttransform ect, The previous engine I used was simple coordinates relative to parent setup, with 1x 2x and 4x scale system, so I don’t trust anything I do with Unity UI, nothing seems to work as I intuitively think it should
I’ll test it out as you suggested.

Cheers