My world space canvas disapears because of occlusion, why ?

Hello

I created a world space canvas, where I put an image.
On top of that image, I put a material with a custom shadder I found there World Space canvas on top of "everything" ? - Questions & Answers - Unity Discussions

That works great, except when I come close to a big object, my UI dissapears.
When I clean occlusion, that works well.
Problem is my UICanvas and my image are not tagged as “static”. Also I tried to bake when my UI canvas was disabled and I still have the same problem.

Do you know why I can have this problem ?

Thanks

Bump, I am having the same issue in our VR game

My world space canvas which is not static can go inside the landscape and disappear. If I disable occlusion culling on the camera the UI appears again but this is not an option for in-game. I have a material with a shader to ZTest always on the UI elements which works a majority of the time except for this occlusion issue.

I cannot find anything to disable occlusion culling for a dynamic object.

I have found a definite hack to solve this.

Typically for 3D I would expand the bounds but I cannot find an exposed way to do this for UI so I am making Unity give the object a larger bounds.

Basically I add an object within my UI that is very small and completely transparent but still rendered. Then I take this element and ensure it is within the viewport of the camera by making it very close. Obviously this will result in some overdraw so ensure that the fillrate is low by making the object small.

This is far from ideal but a solution for now so I can continue on with my game.

I have submitted this to the Unity issue tracker.

1 Like

So I wasn’t the only one to have this issue …
To fix my problem I also used a little hack. I created a second camera with layer “UI”. So it can see through other elements.
In my main camera I excluded the UI layer. That works fine.

I have also this issue.

On 3D Models, you can uncheck “Dynamic Occluded” on the Mesh Renderer.

I can’t find anything similar for 2D. I going to try your tricks…

Since, it’s an old post, maybe you have found others workaround.

Thanks,

Alex