Should I use the new 2D options to render a simple rectangle?

I’m trying to figure out how to render a simple 2D rectangle with C#. I’ve found this code which renders a simple textured quad, but are there any options/functions/classes in the new 2D options that I should use to create a simple 2D rectangle instead of the older approach?

I’m looking for a tutorial, code example, anything which shows how to use the new 2D ways to display a simple 2d 1 color quad/rectangle in game (not GUI). I’ve googled etc can’t find any.

You can use CanvasRenderer.SetVertices.

You can just create a Sprite with a simple all white texture, and then color, and transform it how you need to. That’s probably the easiest way. The sprite will not be a part of the UI.