Unity 2021.3.1f1, URP 12.1.6, AR Foundation 4.2.3
Build to Android device, everything works fine and great
However, either UPGRADING that project, or redoing it from scratch with newer Unity and Packages results in Black/Blank Cam feed, with only the spinning cube visible when building
Unity 2022.2.0f1, URP 14.0.4, AR Foundation 5.0.2
Now in 2022.2 AR Session Origin is Deprecated, however even if switching out the components for the newer XR Origin, I still get a black background, and like I say this is true with upgrading the project or just creating it new from scratch.
So 1st, here’s the setting for the older Unity, where things work fine:
As you can see, the setting are identical in both projects, except of course the older one use AR Session Origin and the newer use XR Origin.
Again, even if not upgrading, but doing everything from scratch in newer versions, I get black screen with only cube visible in cam feed after build. In the newer version, redoing project straight into AR Foundation 5.0.3, results in same issue.
This is easily reproducable and dont need a bug submission I think.
Yes, installed URP 14.0.4 and then:
converted the scene using this
then added the AR Background Renderer to my chosen quality level URP forward render as so:
Build the project and then again, black screen for cam feed. This seems to confirm something is wrong in URP 14.0.4 upward when using in conjunction with AR Foundation 5.0.3 upwards…
I answered this in another thread, but reposting here for others:
Yes unfortunately there is a longstanding bug in URP 14 and up where AR camera backgrounds render solid black. This is fixed in the most recent patch of URP 14 and will be available in a forthcoming Editor release: Unity 2022.2.2f1.
In the meantime you can work around this issue by changing your AR Camera Manager’s background rendering mode to After Opaques as explained here: Migration guide | AR Foundation | 5.0.7
In Unity 2022.2.1f1 using URP 14.0.4 and AR Foundation 5.0.3, using your fix worked for builds but not for XR Simulation in Editor, which was able to render the XR Simulation environment but not any 3d objects in the current scene despite me putting a cube in front of the camera to test. Have your team checked that? I am rolling up to 2022.2.3f1 to see if it is fixed there as we speak.
@ROBYER1_1 We have a fix in the upcoming 5.0.4 patch for the AfterOpaques setting in XR Simulation. The XR Simulation background shader in 5.0.3 has an incorrect ZTest value