1
\$\begingroup\$

So I am not entirely sure how to explain this as I have not had any luck searching online and I'm sure this is a simple problem but I'm being stupid and can't see it.

I have a Canvas which is for my UI obviously and I have added an Image as a Background to the Canvas. The problem I am having is that due to the Image on the Canvas it is blocking my Camera from seeing the Scene with my game object you can see in the background.

On the Canvas, I have tried playing around with Sort Order, Render Mode, and see if I could edit the Z-Position but I can't seem to do that. I'm not too sure what I have missed but I must have missed something.

Any assistance would be great.

Canvas inspector view Image inspector view Camera inspector view

\$\endgroup\$
0
\$\begingroup\$

Just use a second canvas and put the background image into it. Then toggle off everything that may trigger interaction like the Graphic Reycaster component and interactibility options of images themselves. Unless you want to enable something like a background click to be able to "click away" menus or windows.

Now, set that canvas to Screen Space - Camera instead of Screen Space - Overlay. Overlay causes the canvas to be rendered on top of everything else and is meant as foreground UI which should be viewable at all times to the player. Use Plane Distance to set up at which z-position that canvas should be rendered at. Everything behind it will be obscurred by it... but you can set it to any high value (not more than the view distance of your camera though).

\$\endgroup\$
  • 1
    \$\begingroup\$ Awesome. I didn't bother with Plane Distance but everything before that allowed me to get it working. Thank you! \$\endgroup\$ – VCertainty Jul 18 '18 at 6:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.