Issue Description
I previously integrated XR Plugin Management into my project, and later removed the related packages via the Package Manager. Currently, while testing the project, we are using URP (Universal Render Pipeline) and Cinemachine. When running the game in the Game window with Gizmos enabled in the IDE, two reports are triggered: a warning (XRSystem.ReleaseFrame() was not called! UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)) and an exception (AssertionException: Editor camera must resolve target upon finish rendering. Assertion failure. Value was False Expected: True).
Reproduction Steps
- Enable Gizmos in the Game window during play mode.
- Observe the warning and exception being triggered.
Expected Outcome
Gizmos should work without triggering warnings or exceptions.
Test Scenarios and Findings
- Disabling Cinemachine and Camera: Disabling these components prevents the warning and exception when Gizmos are enabled.
- Server Mode: Enabling Gizmos in Server mode does not trigger the warning or exception.
- Client Mode: Disabling Gizmos for Cinemachine in the Gizmos rendering options does not prevent the warning and exception in Client mode.
Summary
We suspect that after removing the XR Plugin package, URP still references some XR configurations, causing it to run the XRSystem script (Debug.LogWarning("XRSystem.ReleaseFrame() was not called!"); at line 171). We need guidance on how to completely remove XR support from URP. This issue affects the use of the Gizmos tab in the Game window during client mode testing.
Environment
- Unity Version: 2021.2.4f1c1
- Platform: Android
Relevant Code/Error Logs
plaintext
复制代码
AssertionException: Editor camera must resolve target upon finish rendering. Assertion failure. Value was False Expected: True
UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <b1bda145be2a466a83211d2ed15d29ea>:0)
UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) (at <b1bda145be2a466a83211d2ed15d29ea>:0)
UnityEngine.Rendering.Universal.UniversalRenderer.Setup (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.1/Runtime/UniversalRenderer.cs:853)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData cameraData, System.Boolean anyPostProcessingEnabled) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.1/Runtime/UniversalRenderPipeline.cs:410)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.1/Runtime/UniversalRenderPipeline.cs:562)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.1/Runtime/UniversalRenderPipeline.cs:264)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <b1bda145be2a466a83211d2ed15d29ea>:0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <b1bda145be2a466a83211d2ed15d29ea>:0)
UnityEngine.GUIUtility:ProcessEvent (int, IntPtr, bool&)
Request for Help
We need assistance in completely removing XR support from URP as it seems to be causing the warning and exception related to the XRSystem script. This issue impacts our ability to test the Game window Gizmos option in client mode. Any guidance on resolving this issue would be greatly appreciated.