How do you draw a rectangle?

Hey, I just want to render a simple, translucent rectangle of specific color and opacity to the screen for the drag select I’m implementing for a simple test project.

Is there a simple function for drawing colored rectangles?

I couldn’t really find any info on this in the documentation, I even tried a search there, but most of the results that looked remotely useful were broken links.

Any help would be appreciated. Thanks

There are actually several ways to do it.

  1. Blueprint way:
    In your hud blueprint use the draw rect node
  2. c++ way:
    In your hud class use the same function to draw using canvas.