Topic locked

Occlusion works in simulation but not build

April 6, 2021 - 6:03am #1

Hi all,

I encountered a problem, where occlusion doesn't work for the area target and its children objects, only on Android build (haven't tested iOS).

Occlusion works just fine in the simulator mode in Unity and there doesn't seem to be any problem.

To make it clear, I added occlusion mesh in the Editor (AreaTarget game object options) and haven't done anything extra (which worked in Vuforia 9.7.5 and Unity 2019.3f4)

Some additional information:

Unity version 2020.31f1

Windows 10

Android, Galaxy S20 FE

Only one area target object, imported from Area Target Creator tool and Matterport API.


I solved this problem by adding the NavMesh,prefab to the scene and applying the occlusion shader to its material but I am not sure if it is a good solution. I am now having this same issue on a new project, so was wondering if this is a known bug or I am missing something very obvious.

Sorry, if this is the wrong place to post. Thanks in advance!


Edit: My area targets are new and compatible with 9.7+ and I am not getting a waring in the Unity editor. Also, I just saw the manual occlusion mesh guide in the Vuforia release notes, will try that anyways.

Edit 2: ATG Windows app I was using was 9.7.5, while my Vuforia version in Unity is 9.8.5. There wasn't an incompatibility warning message though.

Occlusion works in simulation but not build

May 10, 2021 - 10:49am #3

I am having a similar issue, however what you recommended did not solve the issue. I am using:

Vuforia Area Target Creator 9.8.5

Vuforia 9.8.8

Unity 2020.3.7f1

I also tried the instructions here:

but no luck. I get stuck at this step: In the Inspector window, change the Materials' Element 0 to DepthMask. Where do i find that material? (see screenshot) I am new to Unity so any guidance is much appreciated!


Occlusion works in simulation but not build

April 7, 2021 - 4:34am #2


Glad to see it worked in the end.

Could you please let me know you have any outstanding question?

Thank you.

Vuforia Engine Support

Topic locked