I keep getting a warning in XCode no matter what I do in terms of ARFoundation packages and settings in the URP pipeline. I’m using 2020.2.0f1 and URP 10.2.2. As recommended here, I tried downgrading to ARFoundation 4.0. but the problem persists.
Here is the warning I get in XCode:
You can only call cameraDepthTarget inside the scope of a ScriptableRenderPass. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
UnityEngine.Rendering.Universal.ScriptableRenderer:get_cameraDepthTarget()
UnityEngine.XR.ARFoundation.ARBackgroundRendererFeature:AddRenderPasses(ScriptableRenderer, RenderingData&)
UnityEngine.Rendering.Universal.ScriptableRenderer:AddRenderPasses(RenderingData&)
UnityEngine.Rendering.Universal.ForwardRenderer:Setup(ScriptableRenderContext, RenderingData&)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera(ScriptableRenderContext, CameraData, Boolean)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, Camera[])
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, List`1)
It’s pretty much a constant stream of messages, so I’m concerned that just the message is going to slow down the app. Things seem to work fine. Any ideas how to fix this?
I have the same error message here on Android via Logcat as well ( the 1st of your messages … )
2020/12/18 23:05:11.368 27859 27883 Warn Unity You can only call cameraDepthTarget inside the scope of a ScriptableRenderPass. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
I’m using Unity 2020.2.0f1 and URP 10.2.2 as well as AR foundation 4.0 or 4.1. I’m not using one of the other tools you’ve mentioned though. The phone I’m using is a ( quite old ) Pixel[1] and I have the feeling it gives me some hiccups.
Just looking at my errors, and the fact that you are getting the same without the other tools, it seems like it is the implementation of the ARBackgroundRendererFeature for URP. I have no idea how to fix that and I nothing about how to implement a SRP, other than using what’s provided. So, I guess we just wait for a fix…
Due to the wonders of Google I landed here for the same issue.
Just upgraded to 2020.2.1f1 and am now seeing this spew in my logs.
URP: 10.2.2
ARFoundation: 4.1.1
I get the same error with Unity 2020.2.1f1, URP, when I build for iOS and try to use the ARBackgroundRendererFeature, The camera background stopped working, not possible to use AR.
+1 same here on iOS
Android is fine
On my iOS build with Unity 2020.2.1 + URP 10.2.2 + AR Foundation 4.1.1 or 4.0.9 or even 3.1.3; the camera background is rendered but not any AR object or facemask object.
When I tried to place any AR object on the scene, I’m sure the logical object is placed correctly but it is rendered.
Android build is fine
This warning message exists in the URP 10.2.2 package. However, this warning has been fixed in URP 11. Follow the issue tracker to know when this issue is fixed in URP 10.x.
This warning message does not affect the rendering of AR Foundation, apart from the warning messages being printed every frame.
@TreyK-47 thanks for letting us know you guys looked into it. Are there any workarounds for this at the moment?
@jgmakes i have no choice but to use an older version of unity for testing this, however (as you might also be aware of) unity 2019 has the unitywebrequest bug, and so i keep having to move back and forth between 2020.2.4f1 and 2019.4lts…
Living in fear and a bit of a pickle right now
Hope everyone else is having a better time with their Unity Development.