URP and UI canvas Culling Mask

Hello,

I’ve never really had to fix this type of issue before although I have come across it.

I’m using URP in building a VR game and I’ve added a Canvas set to World Space and I need to fix the whole seeing the UI through GameObjects rendering layer issue. I didn’t know (I haven’t done a lot of work in URP) that it doesn’t support having another Camera render only the UI using the Flags and Culling mask and so on.

So how would I go about fixing this issue? I’m a little lost on how to proceed. Thanks!

You speak of this like it’s a known thing. I just fired up an URP project and dropped a world space canvas in with some text, scaled it up to interfere with some objects, and it works as expected.

This image is from the Unity default URP scene for Unity2019.4.15:

6714490--771922--Screen Shot 2021-01-11 at 4.19.03 PM.png

And this is the canvas setup:

6714490--771925--Screen Shot 2021-01-11 at 4.19.16 PM.png

Sorry to have wasted your time, Kurt. It was showing through GameObjects in the editor when the game is playing its working fine.

I do remember having this issue a lot in the past and I had to create dual cameras to make it work correctly. I also remember having to use a shader to fix the issue too. Dear god I hope I haven’t been doing it wrong all these years!

Quick Edit:
It’s all working perfectly now. I was doing something wrong but I don’t know what.

Regardless thank you Kurt.

1 Like