Immediate mode Draw.Ring creating a duplicate Draw Mesh
For some reason, my Draw.Ring immediate mode call seems to be getting duplicated.
My draw call is as simple as the following
public override void DrawShapes(Camera camera)
{
if (camera != Camera.main)
{
return;
}
using(Draw.Command(camera,CameraEvent.BeforeForwardAlpha))
{
Draw.Ring(transform.position,Quaternion.Euler(-90,0,0),10f,1f,new Color(1,1,1,0.3f));
}
}
And for some reason I get the following results using frame debugger.
These duplicate meshes appear to occurring regardless of the shapes I am drawing, so I'm thinking it might just be something I'm doing wrong here.
as long as it doesn't adversely affect the rest of the project then URP is likely more stable!
(long story short, URP has a more sophisticated system for command buffer callbacks and injection points, whereas in BIRP I've had to work around the lack of callbacks with lots of guesswork, that likely is causing this issue in BIRP)
though be sure to back it up, there's still a small chance it's unrelated to BIRP and happens in URP too!
Got a repository, so no worries about backup there!
I'll test it out in URP and come back with the results, then.
EDIT: Switching to URP fixed the issue for me.