My console is filling up with this warning since upgrading to 2020.2 and relevanr AR packages etc.
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.GUIUtility: ProcessEvent (int,intptr,bool&)
From the code (in ScriptableRenderer.cs - URP 10.2.2):
/// <summary>
/// Returns the camera depth target for this renderer.
/// It's only valid to call cameraDepthTarget in the scope of <c>ScriptableRenderPass</c>.
/// <seealso cref="ScriptableRenderPass"/>.
/// </summary>
public RenderTargetIdentifier cameraDepthTarget
{
get
{
if (!m_IsPipelineExecuting)
{
Debug.LogWarning("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.");
// TODO: Ideally we should return an error texture (BuiltinRenderTextureType.None?)
// but this might break some existing content, so we return the pipeline texture in the hope it gives a "soft" upgrade to users.
}
return m_CameraDepthTarget;
}
}
This is the same as Xcode Warning but on Windows (not mac). Iām going to comment out the warning to avoid filling the console but does anyone know if a fix is in the works?
Were you able to comment out the code in the package? My project seems to object when I try to do that and requires a rebuild/re-import that reverts my change.
Itās hard to de-bug the project with the console full of this message.
Iām seeing XCode throwing this warning on iOS build with unity 2020.2 and AR Foundation 4.0.9 or 4.1.1
All the AR objects, particles or augmented mask are not shown in AR mode (iphone 12)
Android is fine
I wouldnāt recommend this, but upgrading to 2021.1.0b1 fixed it, no more warning messages. I made a copy of my project folder before attempting, as itās never been possible to downgrade a project in my experience.
I had some other problems with building in XCode and so it was worth fixing the various things that broke in my upgrade to the beta. Iām using ARFoundation 4.1.1 with URP 11.0.0. I got rid of any preview or experimental packages as well, so had to lose my UI Elements work and just use the standar uGUI.
Can you file a bug with reproducible project so the team can properly track and take a look? If youāve already filed a bug, can you share the case # so I can make sure itās in our queue? Thanks!
@Duckocide , @jgmakes , @Siyka , @alexanderameye , @Nonym , @mb13admin : Can you share your case # so I can make sure weāre properly tracking and our team takes a look? We have not seen any issues with ARF and URP 10 in our test cases so Iād like to get to the bottom of this. Thanks!
Currently getting this error on URP10.2.2, 2020.2.1f1, and ALSO it looks like the depth (or camera Z?) channel isnāt clearing? Once an object pops in, it is slowly occluded by the AR background as they write closer Z values and disappear behind them.
Itās one of the weirdest things Iāve seen. I even removed the occlusion manager. Could this be connected to the error? I could post a video.
Hi @mfuad , my issue is exactly the same as @Chopium explained right above
Clearly URP 10.2 is having compatible bug with any version of ARF
I downloaded ARF samples from github and try to run with URP10.2.2, 2020.2.1f1; the issue occurs on iOS
Thank you for your help. I have submitted a bug report (Case 1305714, not yet approved for public) In the meantime we are reverting to the standard renderer, which seems to have no issues. Luckily switching between pipelines is smooth at this stage of the project.
This was a small screen recording of what Iām seeing on device. My project is not super standard, but I believe URP + ARFoundation are the cause of the issue.
Hi, sorry, Iāve been out of the forums a bit. My bad. Anyway, you can find the script buried in the packages folder. Interestingly, since commenting out and refreshing the package (i.e. back in), the issue has disappeared. Iām at a loss, but I see some people have raised a bug for proper investigation.
Thanks! I recently found while tracking down another bug that itās possible to move libraries out of the package manager and put them directly into the Packages folder (same level as the Assets folder) in this post .
In my case (on a mac), the VFX package was located inside the Unity application Builtin folder. Here are the exact steps on a mac:
In the Unity Editor, open the Packages folder, right-click (vfx package for me) and Show in Finder.
Back in Unity, remove the vfx package using the package manager
Quit Unity.
Make a copy of the package folder and put it in the Packages folder in your project
Now edits will āstickā since you are working off your own copy of the package
The āYou can only call cameraDepthā¦ā error is gone in 2021.b1+ so I didnāt have to do any of this, but if you donāt want to upgrade your project, the above steps should work.