Why does the background image look so small on the canvas in the Scene View?

Hi. In the Unity 2D Block Breaker game in Scene view, the background image occupies only a tiny space on the Canvas even though they are both 1440 x 1080 pixels. However, when you hit Game view the background fits in fine on the canvas.

1 Like

I’m similarly confused.

The camera is really small at bottom left. We put in the background, which makes sense to me.

What doesn’t make sense to me is that, when we run the game, the background seems to fill the enire canvas along with the ui elements.

So there’s a weird issue with these screen canvas overlays. We put in the size as 1440x1880 (for example), and expect that to render 1440 pixels wide. Instead, what’s happening is that the canvas is being portrayed in the Scene View along with your gameobjects, and the canvas has a size of 1440 Unity units and 1880 unity units high. And anything placed on the canvas as a child is scaled to this size (the size of its parent).

Now, in most cases, this is well outside the perspective of your main camera and much larger than any of your game objects. However, it doesn’t matter because the canvas is a Screen Overlay canvas (there are also two other types, but Screen Overlay is the default). When you push play the screne overlay canvas automatically gets resized, rotated, and positioned to be in front of your screen and no longer exists as an object in the game world.

Personally, I like working with Camera Overlays. These also get shown as an object in your scene view, but are instantly repositioned and rescaled relative to the perspective of a specific camera. Most of our games we are working on only have one camera anyway. This means you no longer have a gigantic canvas in your scene view, just a smaller one hovering in front of your camera.

I’m guessing the reason your backgrounds are significantly smaller than your canvas is because it is a Sprite (using a Sprite Renderer component) instead of an Image. An Image is a UI object that must be placed in the canvas, and will therefore scale with the canvas. A Sprite is an object in the game world seperate from your canvas and therefore will not scale down when the canvas scales down.

1 Like

Hello. Thank you so much for your reply. I am a high school teacher in New Zealand just getting started with Unity and was thoroughly confused. Now that I have your reply, I might even use it to help explain the anomaly if my students bring it up.

Regards

Salman Qureshi

Thanks for your reply :slight_smile:

Privacy & Terms