Canvas over everything in scene
How can I render a canvas (or image) over everything in the scene? Specifically 3d gamobjects.
Increase the "depth" of the camera looking at it (assu$$anonymous$$g you already have the canvas stretched over the 3D area).
Answer by AdamSt · Aug 05, 2020 at 11:16 AM
Found out (partly) solution.
I was creating VR app and I needed to create popup system which are appearing in gogles. Using SSO option on camera is not applicable in this case, as UI is only drawn on PC not in gogles itself. I had to use world space, and solution is to:
On every element in UI, I had to use overlay material. e.g. for Image, I needed to use material "UI/Overlay". For text mesh pro component I needed to change material of text from "text mesh pro/distance field" to "text mehs pro/distance field overlay" and so on.. Working perfectly.
Answer by Goat-Boy · Aug 06, 2019 at 03:52 PM
Set your canvas render mode to Screen Space Overlay. https://docs.unity3d.com/Manual/UICanvas.html
can you describe this a bit more in detail? the question and this reply are probably too vague to get the answer you want
I want a image to appear over the enemy flag that this is the enemy's flag, but when I do, the canvas goes behind objects.
Why do you want the UI to be in world space if you want it to be rendered over everything in the scene as your question states? You actually want one or the other, not both.
So the player can see it went the canvas is behind objects
Actually its not applicable in all cases - let's say you want show popup in VR mode (setting to SSO only renders on PC screen, not gogles) - with world space it intersects with 3D objects...
Your answer
Follow this Question
Related Questions
Render only a fraction (say, 75%) of the screen at run time? How to? 0 Answers
A object closer to camera than B object, but A object is behind B and is not visible 1 Answer
How do you get that Grow Home look 1 Answer
How do I render canvas to texture with proper transparency? 2 Answers
Objects under background canvas 0 Answers