Function CommandBuilder2D.WithColor
ScopeColor WithColor (
color |
Scope to draw multiple things with the same color.
void Update () {
Any command that is passed an explicit color parameter will override this color. If another color scope is nested inside this one then that scope will override this color.
using (Draw.WithColor(Color.red)) {
Draw.Line(new Vector3(0, 0, 0), new Vector3(1, 1, 1));
Draw.Line(new Vector3(0, 0, 0), new Vector3(0, 1, 2));
}
}