Search Unity

Bug Xcode Warning

Discussion in 'AR' started by Voronoi, Dec 18, 2020.

  1. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    590
    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:

    Code (CSharp):
    1.  
    2. 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.
    3. UnityEngine.Rendering.Universal.ScriptableRenderer:get_cameraDepthTarget()
    4. UnityEngine.XR.ARFoundation.ARBackgroundRendererFeature:AddRenderPasses(ScriptableRenderer, RenderingData&)
    5. UnityEngine.Rendering.Universal.ScriptableRenderer:AddRenderPasses(RenderingData&)
    6. UnityEngine.Rendering.Universal.ForwardRenderer:Setup(ScriptableRenderContext, RenderingData&)
    7. UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera(ScriptableRenderContext, CameraData, Boolean)
    8. UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
    9. UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, Camera[])
    10. UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, List`1)
    11.  
    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 am using VFX, UIToolkit and UI Builder
     
    jgmakes, eXistng and SamTinybop like this.
  2. olleyOop

    olleyOop

    Joined:
    Nov 29, 2013
    Posts:
    9
    I have the same error message here on Android via Logcat as well ( the 1st of your messages .. )
    Code (CSharp):
    1. 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.
    2.  
    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.
     
  3. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    590
    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...
     
  4. distastee

    distastee

    Joined:
    Mar 25, 2014
    Posts:
    66
    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

    Building on the latest iphone/ios
     
  5. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    +1

    Makes it hard to read logs for sure.

    Came here via another forum post on the same bug, where @Duckocide mentions just commenting out the log.
     
  6. Siyka

    Siyka

    Joined:
    Aug 17, 2014
    Posts:
    10
    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.
     
  7. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    22
    +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

    Related report here: https://forum.unity.com/threads/war...cope-of-a-scriptableren.1028794/#post-6693979

    looks like Unity 2020.2's URP 10 is not yet compatible with ARF 4.1.1
     
  8. mb13admin

    mb13admin

    Joined:
    May 28, 2017
    Posts:
    22
  9. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    Howdy all! Bounced this one off the team, and wanted to share their insight.


    The "cameraDepthTarget" warning message is a problem in the URP 10.2 packages and is being tracked here https://issuetracker.unity3d.com/is...htarget-with-urp-slash-ar-foundation-projects .

    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.
     
  10. jgmakes

    jgmakes

    Joined:
    Jan 10, 2019
    Posts:
    75
    @TreyK-47 - How are teams building on AR in 2020.x with this constant stream of logs?

    First, I can't log anything effectively in this crazy stream. And won't these slow down the processor considerably? Logging is expensive, no?

    And isn't MARS based in 2020? What are all the studios building for iOS doing?
     
    thesleeper likes this.
  11. thesleeper

    thesleeper

    Joined:
    Sep 3, 2014
    Posts:
    14
    @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.
     
    Last edited: Feb 18, 2021