How can I get a Screen Space - Overlay Canvas to render behind a Screen Space - Camera Canvas?

Hi! I’ve added health bars to my game that appear above objects in the world like trees, enemies, etc.
I’ve decided to put these health bars on a screen space - overlay canvas and use WorldToScreenPoint to set their position on screen. This way they appear the same size no matter what distance you are from the object that the health bar is hovering over.

My game’s main UI elements are all in a Screen Space - Camera Canvas so I can have 3d objects in the UI.

The health bars are rendering on top of the main UI which is undesired. Is there anyway to work around this?

8513957--1134737--upload_2022-10-14_11-34-0.png

Have a script that turns off the overlay camera when in the pause menu.
Other than that your setup won’t work

1 Like

Good idea, thank you!

I have the exact opposite issue. My Minimap is stuck behind an overlay canvas. How did you made the screen-space one be visible over the overlay?

2 Likes

as am i. been trying to figure it out for a week now