Search Unity

Bug Unity 2022.2 + ARFoundation + URP --> black screen!

Discussion in 'AR' started by Deleted User, Jan 24, 2023.

  1. Deleted User

    Deleted User

    Guest

    It seems that the ARBackgroundRenderedFeature is not working with Unity 2022.2. The AR features work, but the AR background is black. I have tried every trick that I have been able to find, including tips in this thread.

    I started an empty project with Unity 2022.2 and did the following:
    -Set platform to Android
    -Add ARFoundation package
    -Google ARCore XR Plugin package
    -Add URP package, creteate URP asset and add it in Graphic settings
    -Enabled Google AR Core in the XR Plugin Management
    -Added ARBackgroundRenderedFeature in the Universal Renderer Data
    -Removed Vulkan from Graphics APIs and made sure only OpenGLES3 is enabled in player settings
    -Set Scripting backend to IL2CPP and enabled ARM64 target architecture in player settings

    With Unity 2021.3 the AR background works ok even with URP.
    With 2022.2 it works only if I revert back to standard rendering pipeline.

    Versions:
    Unity 2022.2.1f1
    URP package version 14.0.4
    ARFoundation package 5.03
    ARCore package 5.03
    Windows 11

    Any ideas how to overcome this issue are welcome. Could this be a bug in Unity 2022.2 or in one of the packages? A sample project attached. I have not tested this with iOS, only Android.
     

    Attached Files:

  2. aardruss

    aardruss

    Joined:
    Feb 28, 2022
    Posts:
    5
    I had the exact same problem. I eventually gave up and went back to Unity 2021. All I could put it it down to is the differences in the versions of URP being used. Once I downgraded everything worked fine. I think it is a known bug (as far as I can remember after going through the same process you have - it did seem to be mentioned as a known bug with a fix incoming).
     
    andyb-unity likes this.
  3. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    This is indeed a known bug, and URP team fixed in the 2022.2.2f1 patch!

    https://unity.com/releases/editor/whats-new/2022.2.2#release-notes
    • URP: Fixed an issue where the Universal Renderer could incorrectly clear the render target during the forward opaques pass even if the render target contains valid rendering data produced by a pass that ran before opaque rendering. (ARFB-190)
     
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Will this be backported to 2021.3 LTS @andyb-unity ?
     
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,048
    I dont have any issues with rendering in 2021.3.17, so you probably missed a step in the setup
     
    andyb-unity and aardruss like this.
  6. WeiWuDe

    WeiWuDe

    Joined:
    Nov 3, 2020
    Posts:
    26
    using
    Unity2022.2.11f1
    URP 14.0.6
    Arfoundation 5.0.5
    Android works well, but iOS still get black screen...
    When can be this fixed...
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,048
    Is the URP asset for the quality tier used for IOS setup with the ar foundation render feature?
     
  8. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
  9. WeiWuDe

    WeiWuDe

    Joined:
    Nov 3, 2020
    Posts:
    26
    I think so, because I tried use Unity 2021.3.21f, everything works fine on iOS.
     
  10. WeiWuDe

    WeiWuDe

    Joined:
    Nov 3, 2020
    Posts:
    26
    I have added the AR Background Render Feature at the beginning, Unity 2022.2.11f1 just not work, but with same settings on Unity 2021.3.21f works for me.
     
    xLOAIx likes this.