Styling

You can change the color you are drawing things with and the width of all lines.

Colors can be set by either by simply adding a color parameter to the method call. This works for all variations of drawing methods. You can also use the Draw.WithColor scope which is useful if you are drawing many things with the same color.

// Draw a circle
Draw.Circle(Vector3.zero, Vector3.up, 2);

// Draw a red circle by adding a color parameter
Draw.Circle(Vector3.zero, Vector3.up, 2, Color.red);

// Draw three red cubes using a scope
using (Draw.WithColor(Color.red)) {
Draw.WireBox(transform.position, Vector3.one);
Draw.WireBox(transform.position + Vector3.right, Vector3.one);
Draw.WireBox(transform.position - Vector3.right, Vector3.one);
}
Line widths can be set using the Draw.WithLineWidth scope.

// Draw a red circle with a line width of 2
using (Draw.WithLineWidth(2)) {
Draw.Circle(Vector3.zero, Vector3.up, 2, Color.red);
}
For lines thicker than 1 pixel, line joins become relevant. Read more about them in the documentation for the Draw.WithLineWidth scope.