Why images stay so small instead of the actual size of the canvas?

Why images stay so small instead of the actual size of the canvas and only get their normal size when we press play? Wouldn’t it be better if the images were the size of the canvas, so we could better see how the whole game will actually be with the images and the UI as well? Is there a way to configure the image so as to when we create then in the canvas, they stay their real size compared to the buttons and UI?

1 Like

You can get around this by changing your render mode on your canvas.
Select Canvas in your Hierarchy and then in the Inspector change Render Mode to “Screen Space - Camera”

You’ll see a warning about assigning a camera.

Simply drag your Main Camera from Hierarchy into the Render Camera section of the Canvas Inspector.

Then whatever you see in the Game view is what you should see when running the game.

See more about UI Canvas at https://unity3d.com/learn/tutorials/topics/user-interface-ui/ui-canvas

This is also useful if, like me, you hate 800x600 and want to account for other screen resolutions too. Select Canvas and in the Inspector go to Canvas Scaler, change the UI Scale Mode to “Scale with Screen Size” that way, when you build and run the game it’ll work with more modern screen resolutions. You should also see that the reference resolution stays at 800x600 anyway.

4 Likes

Privacy & Terms