- Home /
Unity 4.6 GUI WorldSpace panel drawn on top?
Hello!
So I am using the new GUI to make Speechbubbles on my characters. I use a Worldspace Cavas with the panels on it and I would like to render those panels on top of my geometry.
I already tried some of the tipps I found in the Forum, but I can't seem to get it work.
There was one person that said I should be using the sorting layers, but I couldn't find any documentation on that and what I have tried so far hasnt worked.
Any help would bre greatly appreciated.
Hello, I dont ever want those elements drawn under the geometry, no. If I understand you correctly, i basically duplicate my Camera, set it's depth to higher than my $$anonymous$$ain Camera, set the culling to only render the UI and assign that Camera to my panel, correct? If I do that, my whole scene only renders the GUI, so I must be doing something wrong
That's exactly right! Also, any "higher than the background" cameras must have their clearing flag set to Depth Only.
Answer by AlwaysSunny · Nov 11, 2014 at 11:36 AM
4.6's UI is referred to as UI - not GUI.
Do you ever want UI elements drawn below world geometry? If so, things can get tricky. If not, UI elements can be drawn by their own camera whose rendering order is later than the main camera, which is a preferred method wherever possible.
How do you do this with image effects? Image effects get cleared when using this method. Bloom would still potentially work since it doesn't require depth, but SSAO would be completely unusable in that scenario. Is there a way to do this without losing SSAO?