Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

What does requestedOcclusionPreferenceMode do?

Discussion in 'AR' started by Katerpilet, Sep 8, 2020.

  1. Katerpilet

    Katerpilet

    Joined:
    Aug 2, 2015
    Posts:
    87
    I noticed this variable that exists on the `AROcclusionManager` called `requestedOcclusionPreferenceMode`, I'm confused as to the behavior of this on ARKit and ARCore. The options are: `PreferEnvironmentOcclusion` and `PreferHumanOcclusion`.

    Are my assumptions correct:
    On ARCore:
    `PreferHumanOcclusion`- This will no-op since there is no human occlusion
    `PreferEnvironmentOcclusion`- If supported will show the depth from the depth API in the camera

    On ARKit:
    `PreferHumanOcclusion`- This will do the human occlusion
    `PreferEnvironmentOcclusion`- If supported (iPad w/ LiDAR) will show the depth from the depth camera on the camera

    Does this mean with ARKit there is no way to mix the two occlusion modes? Or do I need the ARMeshManager for environmental occlusion on iOS?