Occlusion only works after disabling/enabling ARDepthManager

  • Issue category: Occlusion
  • Device type & OS version: iOS
  • Host machine & OS version: M1 MacBook Pro on macOS Monterey 12.5
  • Issue Environment : Unity Mock / On Device
  • ARDK version: 2.1.0
  • Unity version: 2021.3.7

I am trying to get the ScreenSpace Mesh occlusion working using the ARDepthManager and it doesn’t seem to work when the scene starts. It only starts working when I disable and then re-enable the ARDepthManager component in the Unity editor. The behavior is the same on the actual iOS device.
I tried changing the occlusion type in the ARDepthManager to None or Depth Buffer but that still doesn’t get the occlusion working.

I noticed that the order of the Command Buffers on the main camera changes when I disable/re-enable the ARDepthManager component… could it be something with the order of those that matters? Also, if I just remove the MockFrameRenderer command buffer from the main camera, the occlusion starts working again, although the mock frame isn’t rendered.



Hello Julian,

I tried reproducing the issue with the same ARDK version, though I was not able to recreate your issue. Disabling/enabling ARDepthManager doesn’t make a difference on my end.

For more information on enabling occlusions using ScreenSpaceMesh please refer to this developer documentation.

Please let me know if this helps.