Perhaps this is covered at another time, but is there a compelling reason to use Screen Space - Overlay vs. either of Screen Space - Camera or World Space? I’ve always found the enormous UI canvas relative to the game camera to be at best somewhat silly and at worst a hindrance in terms of rational design. I’ve changed it to SS-Camera for this project, but if there’s a good reason (apart from habit or personal preference) to leave it set to SS-Overlay I’d love an explanation.
Have you already taken a look at the manual? The different modes are described there. “Screen Space - Overlay” is very convenient because the Canvas not only adjusts itself automatically to the screen size but its content gets always rendered on top of what the camera renders.
- Unity Manual: Canvas
Maybe the way it’s represented in the editor makes sense to programmers, but as a designer Overlay is a nightmare.
And as a motion designer, attaching it to a camera feels much more intuitive, anyhow. That mechanic is much more in line with how other graphics programs conceptualize the idea of rendering with virtual cameras.
As a communication designer, I can tell you that you will get used to it.
The camera renders non-UI elements in Unity. For me, it makes sense that the UI is separate from the camera because I want to render the UI stuff on top of everything else without any lighting, angles, etc. The position of the UI elements are relative to the screen, not to stuff in the scene, which is much bigger than your screen.
I usually create my UI in a separate scene and add that scene to the game scene. You could try that, too, to keep your scenes tidy.
I’m not going to argue about this anymore, but I don’t think we’re talking about the same concepts. I’m only concerning myself with UIs that render over the game screen, it really doesn’t matter apart from that until you want a little more control over how dynamic your menus are (and then direct control over the UI camera is essential).
Without any example, I don’t know for what you need “direct control over the UI camera” and why it was supposed to be essential. If you want to achieve something the premade tools do not provide, you’ll have to write your own solution. Unity’s premade functionality is limited and covers standard UIs only.
I almost always use the “Screen Space - Overlay” mode, and I write a ton of scripts to add additional behaviour, for instance, I build-up a part of my UIs dynamically via code due to data-binding. The content changes during runtime. I also script animations for my UIs and write shaders to achieve special effects. This is what I do. I don’t need a camera for this, but I’m not a motion designer and have no idea if you will need a camera to achieve whatever you want to achieve. Additional cameras often have a negative impact on the performance of a Unity project.
Unity includes it as an option, so I can’t be the only one who can imagine a use for it.
I understood that you wanted to know why one might want to use “Screen Space - Overlay”. I answered the question from the perspective of a communication designer and programmer and did not claim that the other options were superfluous. They aren’t. However, Unity is Unity, not a hammer.
Here is an official Unity video covering the Canvas Render Modes. Maybe it explains the idea behind the “Screen Space - Overlay” mode better than I:
Use the mode that you feel is best for your project.
- Forum User Guides : How to mark a topic as solved
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.