Why Canvas render mode is set by default to 'Screen space - overlay' ?

Hi guys!

I’m working currently on UFO 2d tutorial and one things bothers me - Why Canvas elements has set “Render mode” to “screen space - overlay” by default ? and how it’s happen that even this text is outside of the camera in the scene it’s in the “Game” view on the right place (look at the picture below) ?

Overlay doesn’t need the camera? It’s just your screen :slight_smile:

I don’t know why they chose it as the default, but I imagine because it’s the simplest. Personally, I use it 99.5+% of the time :slight_smile:

2 Likes

One of the settings has to be the default…

That’s what it’s supposed to do when set to “Screen Space - Overlay”. It’s overlaying the UI onto the screen after everything else is rendered. If you don’t want it to function in that manner then you need to set it to a different render mode.

https://docs.unity3d.com/Manual/UICanvas.html

1 Like

I agree though that it’s weird how different the scale is in the scene editor. In most projects you end up with your entire play area taking up this itty-bitty little corner of the UI area. And when working on the game objects, you have any UI elements that happen to be in the lower-left corner blown up to gargantuan proportions.

I railed against this a bit when the new UI stuff first came out, and by fiddling with the canvas scale properties enough it is possible to get it to a more realistic scale where you can see your UI and your game at the same time… but then I got over it, and now just switch between the two as needed.

2 Likes

My go to mode is Screen Space - Camera with a plane distance as near. Works well for seeing everything in the editor at once. I would recommend it for small 2D games.

As soon as you go to 3D or multiple cameras, Screen Space - Overlay makes more sense.

World Space is also cool to play with. Mostly useful for informational stuff. Make sure you delete the ray casters if you use it a lot.

5 Likes

Thanks for all answers! now it’s clear for me :slight_smile: