I had kMirrors working fine previously. Yesterday, I did a routine restart of my computer, so exited and reloaded my Unity project.
I started immediately getting an issue with kMirrors where 2 errors appeared in the console on every frame (shown below) and the Game screens renders black. Interestingly, the scene view still renders correctly, including correct reflections. I have not changed my scene or project settings. Disabling the GameObject with the kMirrors script on it stops the errors from appearing, but also (as expected) removes reflections from my scene.
Removing the GameObject with the kMirrors script from the scene and re-adding it ends up with the same error, except now I don't have working reflections at all in the scene view. Steps to reproduce the issue are unclear, as I cannot revert to a state where the errors stop appearing.
Any help or guidance would be greatly appreciated – thank you!
First error:
NullReferenceException: Object reference not set to an instance of an object UnityEngine.Rendering.Universal.ScriptableRenderer.SetRenderPassAttachments (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.CameraData& cameraData) (at ./Library/PackageCache/[email protected]/Runtime/ScriptableRenderer.cs:1798) UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at ./Library/PackageCache/[email protected]/Runtime/ScriptableRenderer.cs:1573) UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteBlock (System.Int32 blockIndex, UnityEngine.Rendering.Universal.ScriptableRenderer+RenderBlocks& renderBlocks, UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean submit) (at ./Library/PackageCache/[email protected]/Runtime/ScriptableRenderer.cs:1538) UnityEngine.Rendering.Universal.ScriptableRenderer.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at ./Library/PackageCache/[email protected]/Runtime/ScriptableRenderer.cs:1296) UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData& cameraData) (at ./Library/PackageCache/[email protected]/Runtime/UniversalRenderPipeline.cs:783) UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at ./Library/PackageCache/[email protected]/Runtime/UniversalRenderPipeline.cs:1015) UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List
1[T] cameras) (at ./Library/PackageCache/[email protected]/Runtime/UniversalRenderPipeline.cs:415)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List1[T] cameras) (at /Users/bokken/build/output/unity/unity/Runtime/Export/RenderPipeline/RenderPipeline.cs:52) UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at /Users/bokken/build/output/unity/unity/Runtime/Export/RenderPipeline/RenderPipelineManager.cs:132) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219)
Second error:
BeginProfileEvent("Mirror 202322")
/ EndProfileEvent("UIR.DrawChain")
mismatch calls detected. Did you call cmd.Clear()
after BeginProfileEvent("UIR.DrawChain")
or inside a using (new ProfilingScope(cmd, "UIR.DrawChain"))
block?