How can I draw a rectangle directly to the screen?

Hi,
I would like to draw in Unity3D bounding boxes over the screen. So I am using object detection - and would like to draw 2d lines on the screen to indicate where objects in the real world are. Can anyone help me with this?

Thanks a lot in advance!

I would go with unity LineRenderer

Iโ€™m using the same setting as the nReal laser :stuck_out_tongue:

Thanks for the response, but how can a draw lines directly over the screen? I just want to draw rectangles that are overlayed over the real camera image.
What is the right โ€œvirtualโ€ camera to overlay the image with? In the editor it is the center camera, but I guess on the glasses not? Would it be an option to render the virtual camera into a render texture and then overlay a texture where I have bounding boxes inserted? Or ist this working with the line renderer? If so, how? I donโ€™t want to have a depth here just lines / boxes from left to right, up to down

Are you aiming to do something like this?

Looks great, but no. I am taking the camera image of the RGB camera, and then I am detecting objects with machine learning. What I get from the algorithm are bounding boxes where the objects are. Normally in a 2d Image I would just draw rectangles and labels with OpenCV on the cv:Mat, but here I would need something to also do this - but just draw rectangles and labels over the whole view in the right place

@Elisabeth Have you figured out how to do it?