Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Feature Request Depth Occlusion with AR Foundation 4.1.0 support?

Discussion in 'Unity MARS' started by jbraam, Jul 8, 2020.

  1. jbraam

    jbraam

    Joined:
    Mar 5, 2020
    Posts:
    10
    Last edited: Jul 8, 2020
  2. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    65
    Hello!

    MARS will work with AR Foundation 4.1 and it is quite simple to get occlusion working - just add the "AR Camera Manager" and "AR Occlusion Manager" to the camera (under MARS Session) and configure it as you wish.

    Let us know if you hit any problems!
     
    jmunozarUTech likes this.
  3. AV8-Tech

    AV8-Tech

    Joined:
    Aug 24, 2020
    Posts:
    3
    Hi, I've hit a really annoying problem. I've created a very simple test scene for iOS - a cube. Added AR Foundation and AR Kit 3.1.3 and it works as expected. Load the app and I get a floating cube.

    However, if I change to 4.0.2 in order to get the Occlusion Manager, when the app loads I get the infamous black screen with a square (one face of my cube). Roll back to 3.1.3 and it works again.

    This is ultra frustrating as I really need Occlusion Manager; there doesn't seem to be any fix on forums or videos, just random people saying "send me your logs" and never any solution.

    Please can anyone help? (btw, I'm not a programmer).

    Thanks in advance
    Jon
     
  4. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    246
    Hello @AV8-Tech,

    The infamous black screen can happen due to several factors. Couple of things to check:
    Are you using 4.0.2 across all your packages?. Check the ARFoundation compatibility section (https://docs.unity3d.com/Packages/com.unity.mars-ar-foundation-providers@1.0/manual/index.html) you need to have the same version for ARFoundation, Core and Kit.

    Assuming that you have 4.0.2 on all packages; there are a couple of extra things to look at in our FAQ (https://docs.unity3d.com/Packages/com.unity.mars@1.0/manual/FAQ.html)

    I built my Scene to a device and all I see is a black screen. What went wrong?
    This could happen for a number of reasons. First, double-check the following:
    • You have the ARCore XR Plugin (Android) or ARKit XR Plugin (iOS) installed via Package Manager.
    • The
      FunctionalityInjectionModule
      in
      Assets/ModuleLoader/Settings/Resources
      has a
      Default Island
      set, and this defines
      Default Providers
      including
      ARFoundationPlaneProvider
      , etc. from the AR Foundation Providers package.
    • If you're using SRP/URP/HDRP (Scriptable Render Pipeline, Universal Render Pipeline, High Definition Render Pipeline), ensure that the AR Background Renderer Feature is added to your SRP configuration (generally onto the ForwardRenderer asset for URP projects).
    Finally if everything else fails unfortunately we would need a log (which should be easy to get if you are already building to your phone.
    • Check the device log using adb logcat or running the app through XCode. Unity logs errors on-screen if you create a development build, but you might miss some warnings.
     
unityunity