Nothing rendered when calling Draw.RectangleBorder in succession

Avatar
  • updated
  • Unity's Fault

I'm calling Draw.RectangleBorder twice in a row, and when I do so, nothing is rendered. If either is changed to Draw.Rectangle, then both shapes are rendered. Am I missing something obvious, or is this a bug? My full code is below.

    public override void DrawShapes(Camera cam)
    {
        using (Draw.Command(cam))
        {
            // set static parameter to draw in the local space of this object
            Draw.Matrix = transform.localToWorldMatrix;

            Draw.RectangleBorder(new Vector3(selectionPosition.x, selectionPosition.y), new Rect(Vector2.zero, new Vector2(selectionSize, selectionSize)), 2f);
            Draw.RectangleBorder(new Vector3(borderPosition.x, borderPosition.y), new Rect(Vector2.zero, new Vector2(ChunkData.SIZE, ChunkData.SIZE)), 2f);
            
        }
    }
Reporting a bug? please specify Unity version:
2020.3.10f1
Reporting a bug? please specify Shapes version:
4.1.3
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
Freya Holmér creator
  • Unity's Fault

Instancing isn't working for some reason, please see this thread! a clean reinstall will likely fix it

https://shapes.userecho.com/en/communities/1/topics/385-shapes-not-rendering-in-builds-investigation-megathread

Avatar
Brian Agalsoff

Ah, cheers. Sorry I missed that thread in the first place, a clean reinstall fixed the issue. Thanks!