Multiple Cameras: why are my gizmos not rendered in the game view

Hi,
I’m making a space shooter game, where my spaceship’s movement is restrained within specific bounds. I draw a gizmo to visualise these bounds, and so far it worked perfectly.

But now I want to add a UI, and since my game is orthographic, but I want my UI to be in perspective, I use a camera render mode for my canvas.

Thus I created a new camera (called it “UICam”, and the other is “GameCam”), set it to depth only, made sure the depth is higher than GameCam’s, and the UI displays nicely, as though it was an overlay.

BUT: my gizmos are no longer rendered in the game view. I don’t understand why. Since I’m in “depth only” it doesn’t make any sense that the UICam overwrites the gizmos that are rendered by GameCam.

I tried to set UICam to be Orthographic, thinking maybe that would be the issue, but to no avail. Note that if I set the render mode to “Overlay” the gizmo displays just fine. I guess there’s something I don’t understand about how Gizmos are rendered.

Note: yes, I did enable Gizmos in the game view

To be clear, because some ppl are apparently confused, when I talk about the “game view” I’m talking about the Game Window in the editor, not in the actual final build of the game.

Here’s the game window when UICam is disabled (you can see the green lines from the Gizmo being drawn)

Here’s the game window when UICam is enabled (Gizmo no longer rendered)

Gizmos are used for debugging. They do not get built into the final game.

If you want gizmos in your final build, you need to create your own solution, like THIS

Downvoting me because you werent clear in your initial question isnt the right way to get the help youre looking for, but since i am such a kind soul…

Your gizmos arent showing up in game view (in the editor) because the gizmos are drawn using the top most camera, set to perspective in your case, and the gizmos arent in the shot. Im not sure how youre creating these gizmos, but you need to make sure the top most camera (highest depth) can see them.

Notice in my screenshots how the gizmos are “offset”. You most likely need to adjust the orthographic cameras “size” or the perspective cameras FOV, and guesstimate, since lining up perspective to orthographic perfectly is near impossible. The problem lies with the combination of perspective and orthographic views not lining up.

The easiest solution is to just make a 3rd camera that draws nothing, on the highest depth, and use the same settings as your orthographic camera

OTHRO UI CAM OFF:

ORTHO UI CAM ON: