Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Question Environment Depth unavailable with AR Foundation >= 4.0.12 and AR Core XR Plugin 4.0.12

Discussion in 'AR' started by J_Kost, Oct 29, 2021.

  1. J_Kost

    J_Kost

    Joined:
    Feb 16, 2021
    Posts:
    32
    Hi,

    I am facing the following problem:

    I need the environment depth images from the AR Occlusion Manager.

    After adding an AR occlusion manager to my main project in Unity 2020.3, with an otherwise working AR Foundation scene, I would get an error stating that no XROcclusionSubsystem is present. I verified that the Plug-In Providers in Project Settings > XR Plugin Management are set.

    I use AR Foundation 4.1.7 (verified) and AR Core XR Plugin 4.0.12 (compatible) in this main project and I am unfortunately bound to AR Core XR Plugin versions no less than 3.0.1 and no greater than 4.0.12 by a key plugin/SDK.

    Suspecting that a version mismatch was causing my issue, I set out to test under which circumstances depth images are available. Using the the AR Foundation Samples (downloaded today) from GitHub I found the following:
    depth availablility.PNG
    This, and the lack of a depth option in the XR Plugin Management menu (see images below) when using the the AR Core XR Plugin v 4.0.12 suggests that this version simply does not offer access to depth images.

    What gives? Is there no way to get depth images with AR Core plugin 4.0.12? Are there any setup steps I might have missed?
    @tdmowrer I see you maintain the Git. Do you know how I might be able to work around this issue?

    Cheers for your help in advance!


    I also noticed that there was a separate Depth option in Project Settings > XR Plugin Management > ARCore, when using versions 4.1.7 of both AR Foundation and the AR Core plugin. this option was no longer present when either or both of the plugins were rolled back to v4.0.12.

    AR Foundation Samples 4.1 in 2020.3 with both package versions 4.1.7 (verified)
    samples_41_v417.PNG

    Samples 4.1 in 2020.3 with AR Foundation 4.1.7 (verified) and AR Core 4.0.12 (compatible)
    samples_41_v4012.PNG

    Samples 4.0 in 2020.1 with both package versions 4.0.12 (verified)
    samples_4_v4012.PNG
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,148
  3. J_Kost

    J_Kost

    Joined:
    Feb 16, 2021
    Posts:
    32
    Thanks a lot for clarifying this.
    Being quite new to Unity, finding all of these restrictions beforehand is quite hard for me...
    Perhaps mentioning these platform-dependent restrictions in the main documentation for AR Foundation would be helpful.