Class Draw

Public

Methods for easily drawing things in the editor and in standalone games.

Public Static Methods

Arc (center, start, end, [color])

Draws an arc between two points.

Arrow (from, to, [up, headSize], [color])

Draws an arrow between two points.

ArrowRelativeSizeHead (from, to, up, headFraction, [color])

Draws an arrow between two points with a head that varies with the length of the arrow.

Arrowhead (center, direction, [up], radius, [color])

Draws an arrowhead at a point.

ArrowheadArc (origin, direction, offset, [width], [color])

Bezier (p0, p1, p2, p3, [color])

Draws a cubic bezier curve.

CatmullRom (..., [color])

Draws a...

Circle (center, normal, radius, [color])

Draws a circle.

CircleXY (center, radius, [...])

CircleXZ (center, radius, [...])

Cross (position, [size], [color])

CrossXY (position, [size], [color])

CrossXZ (position, [size], [color])

DashedLine (a, b, dash, gap, [color])

Draws a dashed line between two points.

DashedPolyline (points, dash, gap, [color])

Draws a dashed line through a sequence of points.

InLocalSpace (transform)
InScreenSpace (camera)
Label2D (position, text, ..., [color])

Label3D (position, rotation, text, size, [alignment], [color])

Line (a, b, [color])

Draws a line between two points.

PlaneWithNormal (center, ..., size, [color])

Draws a plane and a visualization of its normal.

Polyline (points, [cycle], [color])

Pops a color from the stack.

Pops a duration scope from the stack.

Pops a line width scope from the stack.

Pops a matrix from the stack.

Pops a persist scope from the stack.

PushColor (color)

Draws everything until the next PopColor with the given color.

PushDuration (duration)

Draws everything until the next PopDuration for a number of seconds.

PushLineWidth (pixels, automaticJoins=true)

Draws all lines until the next PopLineWidth with a given line width in pixels.

PushMatrix (matrix)

Multiply all coordinates until the next PopMatrix with the given matrix.

PushPersist (duration)

Draws everything until the next PopPersist for a number of seconds.

PushSetMatrix (matrix)

Multiply all coordinates until the next PopMatrix with the given matrix.

Ray (..., [color])

Draws a ray...

SolidArc (center, start, end, [color])

Draws a solid arc between two points.

SolidBox (..., [color])

Draws a solid box.

SolidCircle (center, normal, radius, [color])

Draws a disc.

SolidCircleXY (center, radius, [...])

SolidCircleXZ (center, radius, [...])

SolidMesh (...)

Draws a solid mesh...

SolidPlane (center, ..., size, [color])

Draws a solid plane.

SolidRectangle (rect, [color])

Draws a solid rectangle.

SolidTriangle (a, b, c, [color])

Draws a solid triangle.

SphereOutline (center, radius, [color])

Draws a circle outline around a sphere.

WireBox (..., [color])

Draws the outline of a box...

WireCapsule (..., radius, [color])

Draws a capsule with a ...

WireCylinder (..., radius, [color])

Draws a cylinder.

WireGrid (center, rotation, cells, totalSize, [color])

Draws a grid of lines.

WireHexagon (center, rotation, radius, [color])

Draws a hexagon outline.

WireMesh (..., [color])

Draws a wire mesh.

WirePentagon (center, rotation, radius, [color])

Draws a pentagon outline.

WirePlane (center, ..., size, [color])

Draws a wire plane.

WirePolygon (center, vertices, rotation, radius, [color])

Draws a regular polygon outline.

WireRectangle (..., [color])

Draws a rectangle outline.

WireRectangleXZ (center, size, [color])

Draws a rectangle outline.

WireSphere (position, radius, [color])

Draws a wire sphere.

WireTriangle (..., [color])

Draws a triangle outline.

WithColor (color)
WithDuration (duration)
WithLineWidth (pixels, automaticJoins=true)
WithMatrix (matrix)

Public Static Variables

editor

Draws items in the editor if gizmos are enabled.

Public Static
ingame

Draws items in the editor and in standalone games, even if gizmos are disabled.

Public Static
xy

Wrapper for drawing in the XY plane.

Public Static
xz

Wrapper for drawing in the XZ plane.

Public Static

Private/Protected Members

builder
Internal Static
ingame_builder
Internal Static