Table of Contents

Class Draw

public static class Draw
Inheritance
Draw

Fields

Color

The default color for all visuals.

public static readonly ScopedProperty<Color> Color

Field Value

ScopedProperty<Color>

Facing

The default facing direction for some visuals. e.g. this represents the normal of the plane a Circle(float3, float2, Color?, ExpiryTime) is rendered on.

Instead of changing this globally, consider using OnXY() and other similar scope methods.

public static readonly ScopedProperty<Facing> Facing

Field Value

ScopedProperty<Facing>

TextColor

The default color for all text.

public static readonly ScopedProperty<Color> TextColor

Field Value

ScopedProperty<Color>

Transform

The current transform/space all visual positions are specified in.

Instead of changing this globally, consider using WithSpace(float4x4?) and other similar scope methods.

public static readonly ScopedProperty<float4x4> Transform

Field Value

ScopedProperty<float4x4>

Properties

DrawToRenderTextures

By default, debug graphics are not rendered to render textures.
Set this to true to change that behaviour.

public static bool DrawToRenderTextures { get; set; }

Property Value

bool

LineOccludedOpacity

Controls the opacity of lines when occluded, or behind something else.

public static float LineOccludedOpacity { get; set; }

Property Value

float

LineOpacity

Controls the opacity of lines.

public static float LineOpacity { get; set; }

Property Value

float

RenderLayer

The layer used to render all DebugDraw meshes on.

public static int RenderLayer { get; set; }

Property Value

int

SolidOccludedOpacity

Controls the opacity of solid visuals when occluded, or behind something else.

public static float SolidOccludedOpacity { get; set; }

Property Value

float

SolidOpacity

Controls the opacity of solid visuals.

public static float SolidOpacity { get; set; }

Property Value

float

TextOccludedOpacity

Controls the opacity of text when occluded, or behind something else.

public static float TextOccludedOpacity { get; set; }

Property Value

float

TextOpacity

Controls the opacity of text.

public static float TextOpacity { get; set; }

Property Value

float

UpdateMode

Controls when the DebugDraw system updates itself.
See UpdateMode for details.

public static UpdateMode UpdateMode { get; set; }

Property Value

UpdateMode

Methods

Arc(float3, float2, float, float, Color?, ExpiryTime)

Draws a wireframe arc.

public static ref Arc Arc(float3 position, float2 radius, float angle1, float angle2, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float2
angle1 float
angle2 float
color Color?
expiry ExpiryTime

Returns

Arc

Arc(float3, float2, float, float, Color?, Color?, ExpiryTime)

Draws a wireframe arc.

public static ref Arc Arc(float3 position, float2 radius, float angle1, float angle2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

position float3
radius float2
angle1 float
angle2 float
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

Arc

Arrow(float3, float3, Color?, ExpiryTime)

Draws an arrow between two points.

public static ref Arrow Arrow(float3 p1, float3 p2, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color Color?
expiry ExpiryTime

Returns

Arrow

Arrow(float3, float3, Color?, Color?, ExpiryTime)

Draws an arrow between two points.

public static ref Arrow Arrow(float3 p1, float3 p2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

Arrow

Axis(float3, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, ExpiryTime expiry = default)

Parameters

position float3
expiry ExpiryTime

Returns

Axis

Axis(float3, Color?, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, Color? color, ExpiryTime expiry = default)

Parameters

position float3
color Color?
expiry ExpiryTime

Returns

Axis

Axis(float3, float3, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, float3 size, ExpiryTime expiry = default)

Parameters

position float3
size float3
expiry ExpiryTime

Returns

Axis

Axis(float3, float3, Orientation, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, float3 size, Orientation orientation, ExpiryTime expiry = default)

Parameters

position float3
size float3
orientation Orientation
expiry ExpiryTime

Returns

Axis

Axis(float3, float3, Orientation, Color?, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, float3 size, Orientation orientation, Color? color, ExpiryTime expiry = default)

Parameters

position float3
size float3
orientation Orientation
color Color?
expiry ExpiryTime

Returns

Axis

Axis(float3, float3, Orientation, Color, Color, Color, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, float3 size, Orientation orientation, Color colorX, Color colorY, Color colorZ, ExpiryTime expiry = default)

Parameters

position float3
size float3
orientation Orientation
colorX Color
colorY Color
colorZ Color
expiry ExpiryTime

Returns

Axis

Axis(float3, float3, Color?, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, float3 size, Color? color, ExpiryTime expiry = default)

Parameters

position float3
size float3
color Color?
expiry ExpiryTime

Returns

Axis

Axis(float3, float3, Color, Color, Color, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, float3 size, Color colorX, Color colorY, Color colorZ, ExpiryTime expiry = default)

Parameters

position float3
size float3
colorX Color
colorY Color
colorZ Color
expiry ExpiryTime

Returns

Axis

Axis(float3, Color, Color, Color, ExpiryTime)

Draws three lines representing the X, Y, an Z axis.

public static ref Axis Axis(float3 position, Color colorX, Color colorY, Color colorZ, ExpiryTime expiry = default)

Parameters

position float3
colorX Color
colorY Color
colorZ Color
expiry ExpiryTime

Returns

Axis

Box(float3, float3, Color?, ExpiryTime)

Draws a wireframe box.

public static ref Box Box(float3 position, float3 size, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
size float3
color Color?
expiry ExpiryTime

Returns

Box

Box(float3, float3, quaternion, Color?, ExpiryTime)

Draws a wireframe box.

public static ref Box Box(float3 position, float3 size, quaternion rotation, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
size float3
rotation quaternion
color Color?
expiry ExpiryTime

Returns

Box

Capsule(float3, float3, float, Color?, ExpiryTime)

Draws a wireframe capsule.

public static ref Capsule Capsule(float3 p1, float3 p2, float radius, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
radius float
color Color?
expiry ExpiryTime

Returns

Capsule

Circle(float3, float2, Color?, ExpiryTime)

Draws a wireframe circle.

public static ref Circle Circle(float3 position, float2 radius, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float2
color Color?
expiry ExpiryTime

Returns

Circle

Clear()

Clears all drawing commands.

public static void Clear()

Cone(float3, float3, float, Color?, ExpiryTime)

Draws a 3D cone.

public static ref Cone Cone(float3 p1, float3 p2, float angle, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
angle float
color Color?
expiry ExpiryTime

Returns

Cone

Cross(float3, float2, Color?, ExpiryTime)

Draws a 2D cross on the plane defined by the given facing axis.

public static ref Cross Cross(float3 position, float2 size, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
size float2
color Color?
expiry ExpiryTime

Returns

Cross

Cylinder(float3, float3, Color?, ExpiryTime)

Draws a wireframe cylinder, as two circles connected by four lines.

public static ref Cylinder Cylinder(float3 p1, float3 p2, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color Color?
expiry ExpiryTime

Returns

Cylinder

Cylinder(float3, float3, float, Color?, ExpiryTime)

Draws a wireframe cylinder, as two circles connected by four lines.

public static ref Cylinder Cylinder(float3 p1, float3 p2, float radius, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
radius float
color Color?
expiry ExpiryTime

Returns

Cylinder

Cylinder(float3, float3, float, float, Color?, ExpiryTime)

Draws a wireframe cylinder, as two circles connected by four lines.

public static ref Cylinder Cylinder(float3 p1, float3 p2, float radius1, float radius2, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
radius1 float
radius2 float
color Color?
expiry ExpiryTime

Returns

Cylinder

DashedLine(float3, float3, Dash, Color?, ExpiryTime)

Draws a dashed line between two points.

public static ref DashedLine DashedLine(float3 p1, float3 p2, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedLine

DashedLine(float3, float3, Dash, Color?, Color?, ExpiryTime)

Draws a dashed line between two points.

public static ref DashedLine DashedLine(float3 p1, float3 p2, Dash dash, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
dash Dash
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

DashedLine

DashedLine(float3, float3, Color?, ExpiryTime)

Draws a dashed line between two points.

public static ref DashedLine DashedLine(float3 p1, float3 p2, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color Color?
expiry ExpiryTime

Returns

DashedLine

DashedLine(float3, float3, Color?, Color?, ExpiryTime)

Draws a dashed line between two points.

public static ref DashedLine DashedLine(float3 p1, float3 p2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

DashedLine

DashedLine3D(float3, float3, Size, Dash, Color?, ExpiryTime)

Draws a dashed 3D line with a width between two points.

public static ref DashedLine3D DashedLine3D(float3 p1, float3 p2, Size width, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
width Size
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedLine3D

DashedLine3D(float3, float3, Size, Dash, Color?, Color?, ExpiryTime)

Draws a dashed 3D line with a width between two points.

public static ref DashedLine3D DashedLine3D(float3 p1, float3 p2, Size width, Dash dash, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
width Size
dash Dash
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

DashedLine3D

DashedLine3D(float3, float3, Size, Color?, ExpiryTime)

Draws a dashed 3D line with a width between two points.

public static ref DashedLine3D DashedLine3D(float3 p1, float3 p2, Size width, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
width Size
color Color?
expiry ExpiryTime

Returns

DashedLine3D

DashedLine3D(float3, float3, Size, Color?, Color?, ExpiryTime)

Draws a dashed 3D line with a width between two points.

public static ref DashedLine3D DashedLine3D(float3 p1, float3 p2, Size width, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
width Size
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

DashedLine3D

DashedLine3D(float3, float3, Color?, ExpiryTime)

Draws a dashed 3D line with a width between two points.

public static ref DashedLine3D DashedLine3D(float3 p1, float3 p2, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color Color?
expiry ExpiryTime

Returns

DashedLine3D

DashedLine3D(float3, float3, Color?, Color?, ExpiryTime)

Draws a dashed 3D line with a width between two points.

public static ref DashedLine3D DashedLine3D(float3 p1, float3 p2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

DashedLine3D

DashedPolyLine(List<float3>, Dash, List<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<float3> points, Dash dash, List<Color> colors = null, ExpiryTime expiry = default)

Parameters

points List<float3>
dash Dash
colors List<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(List<float3>, Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<float3> points, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

points List<float3>
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(List<float3>, List<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<float3> points, List<Color> colors = null, ExpiryTime expiry = default)

Parameters

points List<float3>
colors List<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(List<float3>, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<float3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points List<float3>
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(List<Vector3>, Dash, List<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<Vector3> points, Dash dash, List<Color> colors = null, ExpiryTime expiry = default)

Parameters

points List<Vector3>
dash Dash
colors List<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(List<Vector3>, Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<Vector3> points, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

points List<Vector3>
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(List<Vector3>, List<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<Vector3> points, List<Color> colors = null, ExpiryTime expiry = default)

Parameters

points List<Vector3>
colors List<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(List<Vector3>, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(List<Vector3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points List<Vector3>
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<VertexData>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<VertexData> points, ExpiryTime expiry = default)

Parameters

points NativeArray<VertexData>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<VertexData>, Dash, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<VertexData> points, Dash dash, ExpiryTime expiry = default)

Parameters

points NativeArray<VertexData>
dash Dash
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<float3>, Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<float3> points, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

points NativeArray<float3>
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<float3>, Dash, NativeArray<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<float3> points, Dash dash, NativeArray<Color> colors, ExpiryTime expiry = default)

Parameters

points NativeArray<float3>
dash Dash
colors NativeArray<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<float3>, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<float3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points NativeArray<float3>
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<float3>, NativeArray<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<float3> points, NativeArray<Color> colors, ExpiryTime expiry = default)

Parameters

points NativeArray<float3>
colors NativeArray<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<Vector3>, Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<Vector3> points, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

points NativeArray<Vector3>
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<Vector3>, Dash, NativeArray<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<Vector3> points, Dash dash, NativeArray<Color> colors, ExpiryTime expiry = default)

Parameters

points NativeArray<Vector3>
dash Dash
colors NativeArray<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<Vector3>, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<Vector3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points NativeArray<Vector3>
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(NativeArray<Vector3>, NativeArray<Color>, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(NativeArray<Vector3> points, NativeArray<Color> colors, ExpiryTime expiry = default)

Parameters

points NativeArray<Vector3>
colors NativeArray<Color>
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, float3, Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, float3 p4, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, float3, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, float3 p4, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, float3, Color, Color, Color, Color, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, float3 p4, Color color1, Color color2, Color color3, Color color4, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
color1 Color
color2 Color
color3 Color
color4 Color
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, float3, Color, Color, Color, Color, Dash, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, float3 p4, Color color1, Color color2, Color color3, Color color4, Dash dash, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
color1 Color
color2 Color
color3 Color
color4 Color
dash Dash
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, Color, Color, Color, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, Color color1, Color color2, Color color3, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
color1 Color
color2 Color
color3 Color
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3, float3, float3, Color, Color, Color, Dash, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3 p1, float3 p2, float3 p3, Color color1, Color color2, Color color3, Dash dash, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
color1 Color
color2 Color
color3 Color
dash Dash
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3[], Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3[] points, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

points float3[]
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3[], Dash, Color[], ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3[] points, Dash dash, Color[] colors = null, ExpiryTime expiry = default)

Parameters

points float3[]
dash Dash
colors Color[]
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3[], Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3[] points, Color? color = null, ExpiryTime expiry = default)

Parameters

points float3[]
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(float3[], Color[], ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(float3[] points, Color[] colors = null, ExpiryTime expiry = default)

Parameters

points float3[]
colors Color[]
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(Vector3[], Dash, Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(Vector3[] points, Dash dash, Color? color = null, ExpiryTime expiry = default)

Parameters

points Vector3[]
dash Dash
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(Vector3[], Dash, Color[], ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(Vector3[] points, Dash dash, Color[] colors = null, ExpiryTime expiry = default)

Parameters

points Vector3[]
dash Dash
colors Color[]
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(Vector3[], Color?, ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(Vector3[] points, Color? color = null, ExpiryTime expiry = default)

Parameters

points Vector3[]
color Color?
expiry ExpiryTime

Returns

DashedPolyLine

DashedPolyLine(Vector3[], Color[], ExpiryTime)

Draws a series of connected dashed lines.

public static ref DashedPolyLine DashedPolyLine(Vector3[] points, Color[] colors = null, ExpiryTime expiry = default)

Parameters

points Vector3[]
colors Color[]
expiry ExpiryTime

Returns

DashedPolyLine

Dot(float3, Size, Color?, ExpiryTime)

A 3D "dot" with a radius. Rendered as a disc that always faces the camera.
Has various options to control this size, orientation, and resolution/shape.

public static ref Dot Dot(float3 position, Size radius, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius Size
color Color?
expiry ExpiryTime

Returns

Dot

Dot(float3, Color?, ExpiryTime)

A 3D "dot" with a radius. Rendered as a disc that always faces the camera.
Has various options to control this size, orientation, and resolution/shape.

public static ref Dot Dot(float3 position, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
color Color?
expiry ExpiryTime

Returns

Dot

GetOutput(out Mesh, out Mesh, out Mesh)

Returns the meshes created from the last call to Output().

public static void GetOutput(out Mesh lineMesh, out Mesh triangleMesh, out Mesh textMesh)

Parameters

lineMesh Mesh
triangleMesh Mesh
textMesh Mesh

Line(float3, float3, Color?, ExpiryTime)

Draws a line between two points.

public static ref Line Line(float3 p1, float3 p2, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color Color?
expiry ExpiryTime

Returns

Line

Line(float3, float3, Color?, Color?, ExpiryTime)

Draws a line between two points.

public static ref Line Line(float3 p1, float3 p2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

Line

Line3D(float3, float3, Size, Color?, ExpiryTime)

Draws a 3D line with a width between two points.

public static ref Line3D Line3D(float3 p1, float3 p2, Size width, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
width Size
color Color?
expiry ExpiryTime

Returns

Line3D

Line3D(float3, float3, Size, Color?, Color?, ExpiryTime)

Draws a 3D line with a width between two points.

public static ref Line3D Line3D(float3 p1, float3 p2, Size width, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
width Size
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

Line3D

Line3D(float3, float3, Color?, ExpiryTime)

Draws a 3D line with a width between two points.

public static ref Line3D Line3D(float3 p1, float3 p2, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color Color?
expiry ExpiryTime

Returns

Line3D

Line3D(float3, float3, Color?, Color?, ExpiryTime)

Draws a 3D line with a width between two points.

public static ref Line3D Line3D(float3 p1, float3 p2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

Line3D

OnPlane(float3)

Sets default facing/plane for all visuals in this scope.
Only applicable to visuals with a facing/up property.

public static FacingScope OnPlane(float3 up)

Parameters

up float3

Returns

FacingScope

The IDisposable scope.

OnXY()

Sets default facing/plane for all visuals in this scope.
Only applicable to visuals with a facing/up property.

public static FacingScope OnXY()

Returns

FacingScope

The IDisposable scope.

OnXZ()

Sets default facing/plane for all visuals in this scope.
Only applicable to visuals with a facing/up property.

public static FacingScope OnXZ()

Returns

FacingScope

The IDisposable scope.

OnYZ()

Sets default facing/plane for all visuals in this scope.
Only applicable to visuals with a facing/up property.

public static FacingScope OnYZ()

Returns

FacingScope

The IDisposable scope.

Output()

All subsequent draw calls will be immediately rendered to a temporary mesh, which can be retrieved with GetOutput(out Mesh, out Mesh, out Mesh).
Note that certain camera related functionality, such as auto size or resolution, may not work as expected and should not be used within an output scope.

public static OutputScope Output()

Returns

OutputScope

Pill(float3, float3, float, Color?, ExpiryTime)

Draws a 2D wireframe capsule.

public static ref Pill Pill(float3 p1, float3 p2, float radius, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
radius float
color Color?
expiry ExpiryTime

Returns

Pill

PolyLine(List<float3>, List<Color>, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(List<float3> points, List<Color> colors = null, ExpiryTime expiry = default)

Parameters

points List<float3>
colors List<Color>
expiry ExpiryTime

Returns

PolyLine

PolyLine(List<float3>, Color?, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(List<float3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points List<float3>
color Color?
expiry ExpiryTime

Returns

PolyLine

PolyLine(List<Vector3>, List<Color>, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(List<Vector3> points, List<Color> colors = null, ExpiryTime expiry = default)

Parameters

points List<Vector3>
colors List<Color>
expiry ExpiryTime

Returns

PolyLine

PolyLine(List<Vector3>, Color?, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(List<Vector3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points List<Vector3>
color Color?
expiry ExpiryTime

Returns

PolyLine

PolyLine(NativeArray<VertexData>, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(NativeArray<VertexData> points, ExpiryTime expiry = default)

Parameters

points NativeArray<VertexData>
expiry ExpiryTime

Returns

PolyLine

PolyLine(NativeArray<float3>, Color?, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(NativeArray<float3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points NativeArray<float3>
color Color?
expiry ExpiryTime

Returns

PolyLine

PolyLine(NativeArray<float3>, NativeArray<Color>, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(NativeArray<float3> points, NativeArray<Color> colors, ExpiryTime expiry = default)

Parameters

points NativeArray<float3>
colors NativeArray<Color>
expiry ExpiryTime

Returns

PolyLine

PolyLine(NativeArray<Vector3>, Color?, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(NativeArray<Vector3> points, Color? color = null, ExpiryTime expiry = default)

Parameters

points NativeArray<Vector3>
color Color?
expiry ExpiryTime

Returns

PolyLine

PolyLine(NativeArray<Vector3>, NativeArray<Color>, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(NativeArray<Vector3> points, NativeArray<Color> colors, ExpiryTime expiry = default)

Parameters

points NativeArray<Vector3>
colors NativeArray<Color>
expiry ExpiryTime

Returns

PolyLine

PolyLine(float3[], Color?, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(float3[] points, Color? color = null, ExpiryTime expiry = default)

Parameters

points float3[]
color Color?
expiry ExpiryTime

Returns

PolyLine

PolyLine(float3[], Color[], ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(float3[] points, Color[] colors = null, ExpiryTime expiry = default)

Parameters

points float3[]
colors Color[]
expiry ExpiryTime

Returns

PolyLine

PolyLine(Vector3[], Color?, ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(Vector3[] points, Color? color = null, ExpiryTime expiry = default)

Parameters

points Vector3[]
color Color?
expiry ExpiryTime

Returns

PolyLine

PolyLine(Vector3[], Color[], ExpiryTime)

Draws a series of connected lines.

public static ref PolyLine PolyLine(Vector3[] points, Color[] colors = null, ExpiryTime expiry = default)

Parameters

points Vector3[]
colors Color[]
expiry ExpiryTime

Returns

PolyLine

Quad(float3, float3, float3, float3, Color?, ExpiryTime)

Draws a wireframe quad from four vertices.

public static ref Quad Quad(float3 p1, float3 p2, float3 p3, float3 p4, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
color Color?
expiry ExpiryTime

Returns

Quad

Quad(float3, float3, float3, float3, Color?, Color?, Color?, Color?, ExpiryTime)

Draws a wireframe quad from four vertices.

public static ref Quad Quad(float3 p1, float3 p2, float3 p3, float3 p4, Color? color1, Color? color2, Color? color3, Color? color4, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
color1 Color?
color2 Color?
color3 Color?
color4 Color?
expiry ExpiryTime

Returns

Quad

Rectangle(float3, float2, Color?, ExpiryTime)

Draws a 2D wireframe rectangle on the plane defined by the given facing axis.

public static ref Rectangle Rectangle(float3 position, float2 size, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
size float2
color Color?
expiry ExpiryTime

Returns

Rectangle

SetLineOpacity(float, float)

A convenience method for setting both LineOpacity and LineOccludedOpacity.

public static void SetLineOpacity(float opacity, float occludedOpacity)

Parameters

opacity float
occludedOpacity float

SetSolidOpacity(float, float)

A convenience method for setting both SolidOpacity and SolidOccludedOpacity.

public static void SetSolidOpacity(float opacity, float occludedOpacity)

Parameters

opacity float
occludedOpacity float

SetTextOpacity(float, float)

A convenience method for setting both TextOpacity and TextOccludedOpacity.

public static void SetTextOpacity(float opacity, float occludedOpacity)

Parameters

opacity float
occludedOpacity float

ShouldDrawGizmos()

Make sure to check this before drawing gizmos.

public static bool ShouldDrawGizmos()

Returns

bool

SolidBox(float3, float3, Color?, ExpiryTime)

Draws a solid box.

public static ref Box SolidBox(float3 position, float3 size, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
size float3
color Color?
expiry ExpiryTime

Returns

Box

SolidBox(float3, float3, quaternion, Color?, ExpiryTime)

Draws a solid box.

public static ref Box SolidBox(float3 position, float3 size, quaternion rotation, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
size float3
rotation quaternion
color Color?
expiry ExpiryTime

Returns

Box

SolidCircle(float3, float2, Color?, ExpiryTime)

Draws a solid circle.

public static ref Circle SolidCircle(float3 position, float2 radius, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float2
color Color?
expiry ExpiryTime

Returns

Circle

SolidPill(float3, float3, float, Color?, ExpiryTime)

Draws a 2D solid capsule.

public static ref Pill SolidPill(float3 p1, float3 p2, float radius, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
radius float
color Color?
expiry ExpiryTime

Returns

Pill

SolidQuad(float3, float3, float3, float3, Color?, ExpiryTime)

Draws a solid quad from four vertices.

public static ref Quad SolidQuad(float3 p1, float3 p2, float3 p3, float3 p4, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
color Color?
expiry ExpiryTime

Returns

Quad

SolidQuad(float3, float3, float3, float3, Color?, Color?, Color?, Color?, ExpiryTime)

Draws a solid quad from four vertices.

public static ref Quad SolidQuad(float3 p1, float3 p2, float3 p3, float3 p4, Color? color1, Color? color2, Color? color3, Color? color4, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
p4 float3
color1 Color?
color2 Color?
color3 Color?
color4 Color?
expiry ExpiryTime

Returns

Quad

SolidRectangle(float3, float2, Color?, ExpiryTime)

Draws a solid 2D rectangle on the plane defined by the given facing axis.

public static ref Rectangle SolidRectangle(float3 position, float2 size, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
size float2
color Color?
expiry ExpiryTime

Returns

Rectangle

SolidSphere(float3, float3, Color?, ExpiryTime)

Draws a wireframe sphere, comprised of three circles along each axis.

public static ref Sphere SolidSphere(float3 position, float3 radius, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float3
color Color?
expiry ExpiryTime

Returns

Sphere

SolidSphere(float3, float3, quaternion, Color?, ExpiryTime)

Draws a wireframe sphere, comprised of three circles along each axis.

public static ref Sphere SolidSphere(float3 position, float3 radius, quaternion rotation, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float3
rotation quaternion
color Color?
expiry ExpiryTime

Returns

Sphere

SolidTriangle(float3, float3, float3, Color?, ExpiryTime)

Draws a solid triangle from three vertices.

public static ref Triangle SolidTriangle(float3 p1, float3 p2, float3 p3, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
color Color?
expiry ExpiryTime

Returns

Triangle

SolidTriangle(float3, float3, float3, Color?, Color?, Color?, ExpiryTime)

Draws a solid triangle from three vertices.

public static ref Triangle SolidTriangle(float3 p1, float3 p2, float3 p3, Color? color1, Color? color2, Color? color3, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
color1 Color?
color2 Color?
color3 Color?
expiry ExpiryTime

Returns

Triangle

SolidWedge(float3, float2, float, float, Color?, ExpiryTime)

Draws a solid wedge. This is similar to an Arc, but is closed off on both ends, and has options for an inner radius.

public static ref Wedge SolidWedge(float3 position, float2 radius, float angle1, float angle2, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float2
angle1 float
angle2 float
color Color?
expiry ExpiryTime

Returns

Wedge

SolidWedge(float3, float2, float, float, Color?, Color?, ExpiryTime)

Draws a solid wedge. This is similar to an Arc, but is closed off on both ends, and has options for an inner radius.

public static ref Wedge SolidWedge(float3 position, float2 radius, float angle1, float angle2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

position float3
radius float2
angle1 float
angle2 float
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

Wedge

Sphere(float3, float3, Color?, ExpiryTime)

Draws a wireframe sphere, comprised of three circles along each axis.

public static ref Sphere Sphere(float3 position, float3 radius, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float3
color Color?
expiry ExpiryTime

Returns

Sphere

Sphere(float3, float3, quaternion, Color?, ExpiryTime)

Draws a wireframe sphere, comprised of three circles along each axis.

public static ref Sphere Sphere(float3 position, float3 radius, quaternion rotation, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float3
rotation quaternion
color Color?
expiry ExpiryTime

Returns

Sphere

Text(float3, ReadOnlySpan<char>, Size, TextAlign, Color?, ExpiryTime)

Draws 3D text in the world.
Note that only basic ASCII characters plus a few extras are supported to keep the font atlas size to a minimum, though the character set can be customized if necessary - see DOC LINK HERE

public static ref Text Text(float3 position, ReadOnlySpan<char> text, Size size, TextAlign align, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
text ReadOnlySpan<char>
size Size
align TextAlign
color Color?
expiry ExpiryTime

Returns

Text

Text(float3, ReadOnlySpan<char>, Size, Color?, ExpiryTime)

Draws 3D text in the world.
Note that only basic ASCII characters plus a few extras are supported to keep the font atlas size to a minimum, though the character set can be customized if necessary - see DOC LINK HERE

public static ref Text Text(float3 position, ReadOnlySpan<char> text, Size size, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
text ReadOnlySpan<char>
size Size
color Color?
expiry ExpiryTime

Returns

Text

Text(float3, ReadOnlySpan<char>, Color?, ExpiryTime)

Draws 3D text in the world.
Note that only basic ASCII characters plus a few extras are supported to keep the font atlas size to a minimum, though the character set can be customized if necessary - see DOC LINK HERE

public static ref Text Text(float3 position, ReadOnlySpan<char> text, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
text ReadOnlySpan<char>
color Color?
expiry ExpiryTime

Returns

Text

Triangle(float3, float3, float3, Color?, ExpiryTime)

Draws a wireframe triangle from three vertices.

public static ref Triangle Triangle(float3 p1, float3 p2, float3 p3, Color? color = null, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
color Color?
expiry ExpiryTime

Returns

Triangle

Triangle(float3, float3, float3, Color?, Color?, Color?, ExpiryTime)

Draws a wireframe triangle from three vertices.

public static ref Triangle Triangle(float3 p1, float3 p2, float3 p3, Color? color1, Color? color2, Color? color3, ExpiryTime expiry = default)

Parameters

p1 float3
p2 float3
p3 float3
color1 Color?
color2 Color?
color3 Color?
expiry ExpiryTime

Returns

Triangle

Wedge(float3, float2, float, float, Color?, ExpiryTime)

Draws a wireframe wedge. This is similar to an Arc, but is closed off on both ends, and has options for an inner radius.

public static ref Wedge Wedge(float3 position, float2 radius, float angle1, float angle2, Color? color = null, ExpiryTime expiry = default)

Parameters

position float3
radius float2
angle1 float
angle2 float
color Color?
expiry ExpiryTime

Returns

Wedge

Wedge(float3, float2, float, float, Color?, Color?, ExpiryTime)

Draws a wireframe wedge. This is similar to an Arc, but is closed off on both ends, and has options for an inner radius.

public static ref Wedge Wedge(float3 position, float2 radius, float angle1, float angle2, Color? color1, Color? color2, ExpiryTime expiry = default)

Parameters

position float3
radius float2
angle1 float
angle2 float
color1 Color?
color2 Color?
expiry ExpiryTime

Returns

Wedge

WithColor(Color)

Sets the draw color for all visuals within this scope.

public static ColorScope WithColor(Color color)

Parameters

color Color

Returns

ColorScope

The IDisposable scope.

WithSpace(float4x4?)

Sets the space/transform for all visual position values within this scope.

public static SpaceScope WithSpace(float4x4? transform)

Parameters

transform float4x4?

A custom matrix. Also accepts a Matrix4x4.
Passing a null will force world space.

Returns

SpaceScope

The IDisposable scope.

WithSpace(Transform)

Sets the space/transform for all visual position values within this scope.

public static SpaceScope WithSpace(Transform transform)

Parameters

transform Transform

Uses the localToWorldMatrix of the given Transform.

Returns

SpaceScope

The IDisposable scope.