RenderGraph Depth/Opaque Texture disabled Error
I am trying to update my project to use RenderGraph support for newer features being used by OpenXR. I have been using Shapes with RenderGraph disabled (Compatibility Mode) because Shapes was always throwing errors at me when using Immediate Mode drawing.
I took the time to make a new project using RenderGraph and implemented your sample IM drawing script, and too my surprise I didn't get the same errors I had in my project. After investigating I found the reason was the URPAsset between the 2 projects.
If both Depth Texture & Opaque Texture are disabled in the URPAsset and RenderGraph is enabled, Shapes will throw the following errors and then crash Unity:
NullReferenceException: Object reference not set to an instance of an object
Render Graph Execution error
InvalidOperationException: The CullingResults instance is no longer valid. This can happen if you re-use it across multiple frames.
I'll post the full log in the next comment.
My game targets the Meta Quest 3, and I need to have the Depth Texture & Opaque Texture disabled for performance reasons, and Shapes is heavily integrated into the game, I hope you can help me Freya!
Thanks Patrick. I tried adding that line but I still get the errors without having Depth texture enabled. I appreciate you trying to help though!