Camera does not work with Unity 6 because of the changes made with URP 17

0 votes
asked May 12, 2024 by jmcgee12 (140 points)
With Unity 6 and URP 17, they have made changes to the scriptable render pipeline. As a result, the Unity plugin for EasyAR, as of version 4.6.3, does not work. I believe it has something to do with the change in camera command buffers not being manually executed anymore...Or maybe it has something to do with the RenderGraph. The camera is just a black screen with two continually updated warnings. Here are the warnings:

Your project uses a scriptable render pipeline. You can use Camera.AddCommandBuffer only with the built-in renderer.
UnityEngine.Camera:AddCommandBuffer (UnityEngine.Rendering.CameraEvent,UnityEngine.Rendering.CommandBuffer)
easyar.CameraImageRenderer:UpdateCommandBuffer (UnityEngine.Camera,UnityEngine.Material,bool) (at ./Library/PackageCache/com.easyar.sense/Runtime/Device/CameraImage/CameraImageRenderer.cs:278)
easyar.CameraImageRenderer:OnFrameUpdate (easyar.OutputFrame) (at ./Library/PackageCache/com.easyar.sense/Runtime/Device/CameraImage/CameraImageRenderer.cs:231)
easyar.ARSession:UpdateSession () (at ./Library/PackageCache/com.easyar.sense/Runtime/Workflow/ARSession.cs:356)
easyar.EasyARController:Update () (at ./Library/PackageCache/com.easyar.sense/Runtime/EasyARController.cs:241)

RecordRenderGraph is not implemented, the pass easyar.EasyARCameraImageRendererFeature+CameraImageRenderPass won't be recorded in the current RenderGraph.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

3 Answers

0 votes
answered Nov 11, 2024 by kenn (18,870 points)
The warning does no harm at all.

We have already made the new URP render graph work for background rendering. But there is a bug or something unusual of the new URP system which we have already reported to Unity and we need it to be fixed first before release. See https://discussions.unity.com/t/glitches-on-ios-with-ar-camera-image-rendering-urp-17-render-graph/1548048

At hot-fix will also be released in a week or two even if Unity doesn't fix the issue, in which case some features of the SDK will not work.

Use URP compatible mode or disable URP for now, you can find options in the Unity project settings or Unity documents.
0 votes
answered Dec 22, 2024 by kenn (18,870 points)
edited Dec 23, 2024 by kenn
Version 4.6.4 is released, changes are listed below, (4.7 will come with a bunch of new  head mounted devices and glasses support in the future and is already available for EasyAR Mega users.)

+ add support for Render Graph of Unity 6 (URP 17+)
+ add support for XROrigin in AR Foundation 5/6
* fix mesh tearing when using dense spatial map
* fix error log in generated collision mesh when using dense spatial map

There is a known issue when using URP which has not been fixed by Unity till our release ( https://discussions.unity.com/t/glitches-on-ios-with-ar-camera-image-rendering-urp-17-render-graph/1548048 ). You will observe visual glitches and artifacts on some iOS/Mac devices when you retrieve camera texture from EasyAR to use it in your application. This has been reported to Unity in the above link and tracked in their internal issue tracker. Please follow the Unity announcements in their issue tracker ( https://issuetracker.unity3d.com/issues/ios-visual-artifacts-are-visible-when-the-cameras-feed-is-rendered-to-a-texture ) or future Unity release notes for further update.

Quick update: 4.6.5 is released, to workaround a (possible) Unity 6 URP 17 render graph bug, which will make the rendering unpredictable on Windows DX11 (not on any other platforms).
0 votes
answered Dec 24, 2024 by kenn (18,870 points)

4.6.5 is released very shortly after 4.6.4, because more issues are found by our users. It looks like Unity 6 is not stable enough, at least not as stable as their compatibility mode. So, we put following announcement in our release mails.

Announcement for Unity 6 URP 17+ render graph support

Although EasyAR is supporting Unity 6 URP 17+ render graph now, there are still unresolved issues at Unity side. So, it is still suggested to use URP compatibility mode if you find anything unusual.

Known issues on Unity 6000.0.32f1 include,
1. [unresolved] Glitches and artifacts are observed on iOS/Mac when you retrieve camera texture from EasyAR (as the sample Coloring3D does). This has been reported to Unity https://discussions.unity.com/t/glitches-on-ios-with-ar-camera-image-rendering-urp-17-render-graph/1548048 and is tracked in their issue tracker: https://issuetracker.unity3d.com/issues/ios-visual-artifacts-are-visible-when-the-cameras-feed-is-rendered-to-a-texture.
2. [unresolved] Screen will be black on iOS/Mac if you set Render Scale to a value other than 1 (like the Unity template Mobile_RPAsset.asset) and when you retrieve camera texture from EasyAR (as the sample Coloring3D does). We are going to report to Unity later.
3. [has workaround in EasyAR] The camera image is unpredictable on Windows DX11. We are going to report to Unity later.

We will list our reports in the platform requirements page of the Unity plugin documents, but may stop catching up on Unity new updates. It is suggested to check updates in Unity issue links and give feedback to Unity directly.

Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...