Class Draw
public static class Draw
- Inheritance
-
Draw
Fields
Color
The default color for all visuals.
public static readonly ScopedProperty<Color> Color
Field Value
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
TextColor
The default color for all text.
public static readonly ScopedProperty<Color> TextColor
Field Value
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
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
LineOccludedOpacity
Controls the opacity of lines when occluded, or behind something else.
public static float LineOccludedOpacity { get; set; }
Property Value
LineOpacity
RenderLayer
The layer used to render all DebugDraw meshes on.
public static int RenderLayer { get; set; }
Property Value
SolidOccludedOpacity
Controls the opacity of solid visuals when occluded, or behind something else.
public static float SolidOccludedOpacity { get; set; }
Property Value
SolidOpacity
Controls the opacity of solid visuals.
public static float SolidOpacity { get; set; }
Property Value
TextOccludedOpacity
Controls the opacity of text when occluded, or behind something else.
public static float TextOccludedOpacity { get; set; }
Property Value
TextOpacity
UpdateMode
Controls when the DebugDraw system updates itself.
See UpdateMode for details.
public static UpdateMode UpdateMode { get; set; }
Property Value
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
Returns
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
positionfloat3radiusfloat2angle1floatangle2floatcolor1Color?color2Color?expiryExpiryTime
Returns
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
p1float3p2float3colorColor?expiryExpiryTime
Returns
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
p1float3p2float3color1Color?color2Color?expiryExpiryTime
Returns
Axis(float3, ExpiryTime)
Draws three lines representing the X, Y, an Z axis.
public static ref Axis Axis(float3 position, ExpiryTime expiry = default)
Parameters
positionfloat3expiryExpiryTime
Returns
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
positionfloat3colorColor?expiryExpiryTime
Returns
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
positionfloat3sizefloat3expiryExpiryTime
Returns
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
positionfloat3sizefloat3orientationOrientationexpiryExpiryTime
Returns
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
positionfloat3sizefloat3orientationOrientationcolorColor?expiryExpiryTime
Returns
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
positionfloat3sizefloat3orientationOrientationcolorXColorcolorYColorcolorZColorexpiryExpiryTime
Returns
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
positionfloat3sizefloat3colorColor?expiryExpiryTime
Returns
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
Returns
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
positionfloat3colorXColorcolorYColorcolorZColorexpiryExpiryTime
Returns
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
positionfloat3sizefloat3colorColor?expiryExpiryTime
Returns
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
positionfloat3sizefloat3rotationquaternioncolorColor?expiryExpiryTime
Returns
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
p1float3p2float3radiusfloatcolorColor?expiryExpiryTime
Returns
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
positionfloat3radiusfloat2colorColor?expiryExpiryTime
Returns
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
p1float3p2float3anglefloatcolorColor?expiryExpiryTime
Returns
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
positionfloat3sizefloat2colorColor?expiryExpiryTime
Returns
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
p1float3p2float3colorColor?expiryExpiryTime
Returns
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
p1float3p2float3radiusfloatcolorColor?expiryExpiryTime
Returns
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
Returns
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
p1float3p2float3dashDashcolorColor?expiryExpiryTime
Returns
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
Returns
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
p1float3p2float3colorColor?expiryExpiryTime
Returns
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
p1float3p2float3color1Color?color2Color?expiryExpiryTime
Returns
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
Returns
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
Returns
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
p1float3p2float3widthSizecolorColor?expiryExpiryTime
Returns
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
Returns
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
p1float3p2float3colorColor?expiryExpiryTime
Returns
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
p1float3p2float3color1Color?color2Color?expiryExpiryTime
Returns
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
Returns
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
pointsList<float3>dashDashcolorColor?expiryExpiryTime
Returns
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
pointsList<float3>colorsList<Color>expiryExpiryTime
Returns
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
pointsList<float3>colorColor?expiryExpiryTime
Returns
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
Returns
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
pointsList<Vector3>dashDashcolorColor?expiryExpiryTime
Returns
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
pointsList<Vector3>colorsList<Color>expiryExpiryTime
Returns
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
pointsList<Vector3>colorColor?expiryExpiryTime
Returns
DashedPolyLine(NativeArray<VertexData>, ExpiryTime)
Draws a series of connected dashed lines.
public static ref DashedPolyLine DashedPolyLine(NativeArray<VertexData> points, ExpiryTime expiry = default)
Parameters
pointsNativeArray<VertexData>expiryExpiryTime
Returns
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
pointsNativeArray<VertexData>dashDashexpiryExpiryTime
Returns
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
pointsNativeArray<float3>dashDashcolorColor?expiryExpiryTime
Returns
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
pointsNativeArray<float3>dashDashcolorsNativeArray<Color>expiryExpiryTime
Returns
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
pointsNativeArray<float3>colorColor?expiryExpiryTime
Returns
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
pointsNativeArray<float3>colorsNativeArray<Color>expiryExpiryTime
Returns
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
pointsNativeArray<Vector3>dashDashcolorColor?expiryExpiryTime
Returns
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
pointsNativeArray<Vector3>dashDashcolorsNativeArray<Color>expiryExpiryTime
Returns
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
pointsNativeArray<Vector3>colorColor?expiryExpiryTime
Returns
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
pointsNativeArray<Vector3>colorsNativeArray<Color>expiryExpiryTime
Returns
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
Returns
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
p1float3p2float3p3float3colorColor?expiryExpiryTime
Returns
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
Returns
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
Returns
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
p1float3p2float3p3float3p4float3color1Colorcolor2Colorcolor3Colorcolor4ColorexpiryExpiryTime
Returns
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
p1float3p2float3p3float3p4float3color1Colorcolor2Colorcolor3Colorcolor4ColordashDashexpiryExpiryTime
Returns
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
Returns
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
Returns
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
pointsfloat3[]dashDashcolorColor?expiryExpiryTime
Returns
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
pointsfloat3[]dashDashcolorsColor[]expiryExpiryTime
Returns
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
pointsfloat3[]colorColor?expiryExpiryTime
Returns
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
pointsfloat3[]colorsColor[]expiryExpiryTime
Returns
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
pointsVector3[]dashDashcolorColor?expiryExpiryTime
Returns
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
pointsVector3[]dashDashcolorsColor[]expiryExpiryTime
Returns
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
pointsVector3[]colorColor?expiryExpiryTime
Returns
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
pointsVector3[]colorsColor[]expiryExpiryTime
Returns
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
positionfloat3radiusSizecolorColor?expiryExpiryTime
Returns
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
positionfloat3colorColor?expiryExpiryTime
Returns
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
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
p1float3p2float3colorColor?expiryExpiryTime
Returns
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
p1float3p2float3color1Color?color2Color?expiryExpiryTime
Returns
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
p1float3p2float3widthSizecolorColor?expiryExpiryTime
Returns
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
Returns
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
p1float3p2float3colorColor?expiryExpiryTime
Returns
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
p1float3p2float3color1Color?color2Color?expiryExpiryTime
Returns
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
upfloat3
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
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
p1float3p2float3radiusfloatcolorColor?expiryExpiryTime
Returns
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
pointsList<float3>colorsList<Color>expiryExpiryTime
Returns
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
pointsList<float3>colorColor?expiryExpiryTime
Returns
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
pointsList<Vector3>colorsList<Color>expiryExpiryTime
Returns
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
pointsList<Vector3>colorColor?expiryExpiryTime
Returns
PolyLine(NativeArray<VertexData>, ExpiryTime)
Draws a series of connected lines.
public static ref PolyLine PolyLine(NativeArray<VertexData> points, ExpiryTime expiry = default)
Parameters
pointsNativeArray<VertexData>expiryExpiryTime
Returns
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
pointsNativeArray<float3>colorColor?expiryExpiryTime
Returns
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
pointsNativeArray<float3>colorsNativeArray<Color>expiryExpiryTime
Returns
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
pointsNativeArray<Vector3>colorColor?expiryExpiryTime
Returns
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
pointsNativeArray<Vector3>colorsNativeArray<Color>expiryExpiryTime
Returns
PolyLine(float3[], Color?, ExpiryTime)
Draws a series of connected lines.
public static ref PolyLine PolyLine(float3[] points, Color? color = null, ExpiryTime expiry = default)
Parameters
pointsfloat3[]colorColor?expiryExpiryTime
Returns
PolyLine(float3[], Color[], ExpiryTime)
Draws a series of connected lines.
public static ref PolyLine PolyLine(float3[] points, Color[] colors = null, ExpiryTime expiry = default)
Parameters
pointsfloat3[]colorsColor[]expiryExpiryTime
Returns
PolyLine(Vector3[], Color?, ExpiryTime)
Draws a series of connected lines.
public static ref PolyLine PolyLine(Vector3[] points, Color? color = null, ExpiryTime expiry = default)
Parameters
pointsVector3[]colorColor?expiryExpiryTime
Returns
PolyLine(Vector3[], Color[], ExpiryTime)
Draws a series of connected lines.
public static ref PolyLine PolyLine(Vector3[] points, Color[] colors = null, ExpiryTime expiry = default)
Parameters
pointsVector3[]colorsColor[]expiryExpiryTime
Returns
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
Returns
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
p1float3p2float3p3float3p4float3color1Color?color2Color?color3Color?color4Color?expiryExpiryTime
Returns
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
positionfloat3sizefloat2colorColor?expiryExpiryTime
Returns
SetLineOpacity(float, float)
A convenience method for setting both LineOpacity and LineOccludedOpacity.
public static void SetLineOpacity(float opacity, float occludedOpacity)
Parameters
SetSolidOpacity(float, float)
A convenience method for setting both SolidOpacity and SolidOccludedOpacity.
public static void SetSolidOpacity(float opacity, float occludedOpacity)
Parameters
SetTextOpacity(float, float)
A convenience method for setting both TextOpacity and TextOccludedOpacity.
public static void SetTextOpacity(float opacity, float occludedOpacity)
Parameters
ShouldDrawGizmos()
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
positionfloat3sizefloat3colorColor?expiryExpiryTime
Returns
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
positionfloat3sizefloat3rotationquaternioncolorColor?expiryExpiryTime
Returns
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
positionfloat3radiusfloat2colorColor?expiryExpiryTime
Returns
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
p1float3p2float3radiusfloatcolorColor?expiryExpiryTime
Returns
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
Returns
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
p1float3p2float3p3float3p4float3color1Color?color2Color?color3Color?color4Color?expiryExpiryTime
Returns
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
positionfloat3sizefloat2colorColor?expiryExpiryTime
Returns
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
positionfloat3radiusfloat3colorColor?expiryExpiryTime
Returns
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
positionfloat3radiusfloat3rotationquaternioncolorColor?expiryExpiryTime
Returns
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
p1float3p2float3p3float3colorColor?expiryExpiryTime
Returns
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
Returns
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
Returns
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
positionfloat3radiusfloat2angle1floatangle2floatcolor1Color?color2Color?expiryExpiryTime
Returns
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
positionfloat3radiusfloat3colorColor?expiryExpiryTime
Returns
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
positionfloat3radiusfloat3rotationquaternioncolorColor?expiryExpiryTime
Returns
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
positionfloat3textReadOnlySpan<char>sizeSizealignTextAligncolorColor?expiryExpiryTime
Returns
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
positionfloat3textReadOnlySpan<char>sizeSizecolorColor?expiryExpiryTime
Returns
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
positionfloat3textReadOnlySpan<char>colorColor?expiryExpiryTime
Returns
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
p1float3p2float3p3float3colorColor?expiryExpiryTime
Returns
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
Returns
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
Returns
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
positionfloat3radiusfloat2angle1floatangle2floatcolor1Color?color2Color?expiryExpiryTime
Returns
WithColor(Color)
Sets the draw color for all visuals within this scope.
public static ColorScope WithColor(Color color)
Parameters
colorColor
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
transformfloat4x4?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
transformTransformUses the localToWorldMatrix of the given Transform.
Returns
- SpaceScope
The IDisposable scope.