Immediate Mode Draw v1.4.4
API Reference



IMDraw.SetTarget (IMDrawCamera camera)
IMDraw.Flush()
IMDraw.Flush(IMDrawCamera camera)
IMDraw.FlushAll ()
IMDraw.SetDefaultZTest ()
IMDrawZTest IMDraw.ZTest
IMDraw.Line3D (Vector3 from, Vector3 to, Color color, float duration = 0.0f)
IMDraw.Line3D (Vector3 from, Vector3 to, Color fromColor, Color toColor, float duration = 0.0f)
IMDraw.Ray3D(Ray ray, float length, Color color, float duration = 0.0f)
IMDraw.Ray3D(Ray ray, float length, Color fromColor, Color toColor, float duration = 0.0f)
IMDraw.Ray3D(Vector3 origin, Vector3 direction, float length, Color color, float duration = 0.0f)
IMDraw.Ray3D(Vector3 origin, Vector3 direction, float length, Color startColor, Color endColor, float duration = 0.0f)
IMDraw.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.WireBox3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)
IMDraw.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)
IMDraw.Box3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)
IMDraw.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)
IMDraw.WirePyramid3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Pyramid3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.WireRhombus3D (Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Rhombus3D(Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float radius, float sectorAngle, Color color, float duration = 0.0f)
IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float innerRadius, float outerRadius, float directionAngle, float sectorAngle, Color color, float duration = 0.0f)
IMDraw.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Disc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.WireSphere3D (Vector3 center, float radius, Color color, float duration = 0.0f)
IMDraw.WireSphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0.0f)
IMDraw.Sphere3D (Vector3 center, float radius, Color color, float duration = 0.0f)
IMDraw.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0.0f)
IMDraw.WireEllipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)
IMDraw.WireEllipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)
IMDraw.Ellipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)
IMDraw.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)
IMDraw.WireCone3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.WireCone3D(Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0.0f)
IMDraw.Cone3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Cone3D(Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0.0f)
IMDraw.WireCapsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.WireCylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Axis3D (Vector3 origin, Quaternion rotation, float length, float alpha, float duration = 0.0f)
IMDraw.Axis3D(Vector3 origin, Quaternion rotation, Vector3 length, float alpha, float duration = 0.0f)
IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, IMDrawAxis axis, Color color, float duration = 0.0f)
IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, Color color, float duration = 0.0f)
IMDraw.GridPoint3D(Vector3 origin, Quaternion rotation, float extents, Color color, float duration = 0.0f)
IMDraw.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color, float duration = 0.0f)
IMDraw.Bounds (Bounds bounds, Color color)
IMDraw.Bounds (Renderer renderer, Color color)
IMDraw.Collider (SphereCollider sphereCollider, Color color, float scaleOffset, bool solid)
IMDraw.Collider (BoxCollider boxCollider, Color color, float scaleOffset, bool solid)
IMDraw.Collider (CapsuleCollider capsuleCollider, Color color, float scaleOffset, bool solid)
IMDraw.Collider (WheelCollider wheelCollider, Color color, float scaleOffset, bool solid)
IMDraw.Collider (MeshCollider meshCollider, Color color, float scaleOffset)
IMDraw.Collider (Collider collider, Color color, float scaleOffset, bool solid)
IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color, float duration = 0.0f)
IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color, float duration = 0.0f)
IMDraw.Spotlight (Light light, Color wireFrameColor, Color solidColour)
IMDraw.Frustum (Camera camera, Color color)
IMDraw.Label (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.Label(float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.LabelShadowed(float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.LabelShadowed(float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.Label(Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.LabelShadowed (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.LabelShadowed(Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.LabelShadowed(Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
IMDraw.LabelShadowed(Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)
Vector2 IMDraw.GetLabelSize (string text)
IMDraw.RectangleOutline2D (Rect rect, Color color, float duration = 0.0f)
IMDraw.RectangleFilled2D (Rect rect, Color color, float duration = 0.0f)
IMDraw.Rectangle2D (Rect rect, Color fillColor, Color outlineColor, float duration = 0.0f)
IMDraw.Image2D(Texture2D texture, Rect rect, Color color, float duration = 0.0f)
IMDraw.Image2D (Texture2D texture, Rect rect, Rect texCoord, Color color, float duration = 0.0f)
IMDraw.Image2D(Texture2D texture, Rect rect, ScaleMode scaleMode, float aspect, Color color, float duration = 0.0f)
IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, string label, float duration = 0.0f)
IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)
IMDraw.TextMeshBillboard(Vector3 position, float widthScale, float heightScale, Color color, string label, float duration = 0.0f)
IMDraw.TextMeshBillboard(Vector3 position, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)
IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, bool fixedScale, string label, float duration = 0.0f)
IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, bool fixedScale, string label, float duration = 0.0f)
IMDraw.TextMesh(Vector3 position, Quaternion rotation, float scale, Color color, string label, float duration = 0.0f)
IMDraw.TextMesh (Vector3 position, Quaternion rotation, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)
IMDraw.TextMesh(Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, string label, float duration = 0.0f)
IMDraw.TextMesh(Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)

IMGizmos.SetDefaultZTest()
IMDrawZTest IMGizmos.ZTest
IMGizmos.Line3D (Vector3 from, Vector3 to, Color color)
IMGizmos.Ray3D (Ray ray, float length, Color color)
IMGizmos.Ray3D (Vector3 origin, Vector3 direction, float length, Color color)
IMGizmos.Ray3D (Vector3 origin, Quaternion rotation, float length, Color color)
IMGizmos.WireQuad3D(Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)
IMGizmos.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)
IMGizmos.Quad3D(Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
IMGizmos.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)
IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)
IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color solidColor, Color wireframeColor)
IMGizmos.WirePyramid3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
IMGizmos.Pyramid3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
IMGizmos.Pyramid3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
IMGizmos.WireRhombus3D(Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)
IMGizmos.Rhombus3D(Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)
IMGizmos.Rhombus3D(Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
IMGizmos.Arc3D(Vector3 center, Quaternion rotation, float radius, float sectorAngle, Color color)
IMGizmos.Arc3D(Vector3 center, Quaternion rotation, float innerRadius, float outerRadius, float directionAngle, float sectorAngle, Color color)
IMGizmos.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)
IMGizmos.Disc3D(Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)
IMGizmos.Disc3D(Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
IMGizmos.WireSphere3D(Vector3 center, Quaternion rotation, float radius, Color color)
IMGizmos.Sphere3D(Vector3 center, Quaternion rotation, float radius, Color color)
IMGizmos.Sphere3D(Vector3 center, Quaternion rotation, float radius, Color solidColor, Color wireframeColor)
IMGizmos.WireEllipsoid3D(Vector3 center, Quaternion rotation, Vector3 extents, Color color)
IMGizmos.Ellipsoid3D(Vector3 center, Quaternion rotation, Vector3 extents, Color color)
IMGizmos.Ellipsoid3D(Vector3 center, Quaternion rotation, Vector3 extents, Color solidColor, Color wireframeColor)
IMGizmos.WireCone3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
IMGizmos.WireCapsule3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
IMGizmos.Capsule3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
IMGizmos.Capsule3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
IMGizmos.WireCylinder3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
IMGizmos.Cylinder3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
IMGizmos.Cylinder3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
IMGizmos.WireMesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)
IMGizmos.WireMesh(Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)
IMGizmos.WireMesh(Mesh mesh, Transform tf, Color color)
IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)
IMGizmos.Mesh(Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)
IMGizmos.Mesh(Mesh mesh, Vector3 position, Quaternion rotation, Color solidColor, Color wireframeColor)
IMGizmos.Mesh(Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color solidColor, Color wireframeColor)
IMGizmos.Axis3D(Vector3 origin, Quaternion rotation, float length, float alpha)
IMGizmos.Axis3D(Vector3 origin, Quaternion rotation, Vector3 length, float alpha)
IMGizmos.AxisGridPoint3D (Vector3 origin, Quaternion rotation, Vector3 halfLength, float alpha)
IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, float extents, Color color)
IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color)
IMGizmos.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, GizmoDrawAxis axis, Color color)
IMGizmos.Bounds (Bounds bounds, Color color)
IMGizmos.Bounds (Renderer renderer, Color color)
IMGizmos.Label(float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, int fontSize = 12)
IMGizmos.LabelShadowed(float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, int fontSize = 12)
IMGizmos.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
IMGizmos.LabelShadowed(Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
IMGizmos.Label(Vector3 position, float offsetX, float offsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
IMGizmos.LabelShadowed (Vector3 position, float offsetX, float offsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
IMGizmos.Image (Rect rect, Color color, Texture2D texture)



IMDraw.SetTarget (IMDrawCamera camera)

Set a camera as the draw target.
Parameters
cameraTarget camera.
Back to top

IMDraw.Flush()

Flush draw commands on the current target camera.

Back to top

IMDraw.Flush(IMDrawCamera camera)

Flush draw commands for specified camera.
Parameters
cameraTarget IMDrawCamera.
Back to top

IMDraw.FlushAll ()

Flush all draw commands.

Back to top

IMDraw.SetDefaultZTest ()

Set current draw mode to use default Z testing (LEqual). Only affects GL primitives, meshes and text meshes.

Back to top

IMDrawZTest IMDraw.ZTest

Set/get current draw mode to use specified Z testing. Only affects GL primitives, meshes and text meshes.

Back to top

IMDraw.Line3D (Vector3 from, Vector3 to, Color color, float duration = 0.0f)

Draw a 3D line.
Parameters
fromStarting point of the line.
toEnding point of the line.
colorLine color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Line3D (Vector3 from, Vector3 to, Color fromColor, Color toColor, float duration = 0.0f)

Draw a 3D line.
Parameters
fromStarting point of the line.
toEnding point of the line.
fromColorColor of line from the starting point.
toColorColor of line from the ending point.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Ray3D(Ray ray, float length, Color color, float duration = 0.0f)

Draw a 3D ray.
Parameters
raySource ray.
lengthLength of line.
colorRay color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Ray3D(Ray ray, float length, Color fromColor, Color toColor, float duration = 0.0f)

Draw a 3D ray.
Parameters
raySource ray.
lengthLength of line.
fromColorColor of line from the starting point.
toColorColor of line from the ending point.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Ray3D(Vector3 origin, Vector3 direction, float length, Color color, float duration = 0.0f)

Draw a 3D ray.
Parameters
originOrigin of ray.
directionDirection of ray (assumed to be normalised).
lengthLength of line.
colorRay color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Ray3D(Vector3 origin, Vector3 direction, float length, Color startColor, Color endColor, float duration = 0.0f)

Draw a 3D ray.
Parameters
originOrigin of ray.
directionDirection of ray (assumed to be normalised).
lengthLength of line.
startColorColor of line from starting point of the ray.
endColorColor of line from ending point of the ray.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a 3D quad.
Parameters
centerQuad center position.
rotationQuad rotation.
sizeXWidth of quad.
sizeYHeight of quad.
axisOrientation axis of quad.
colorQuad color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireBox3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)

Draw an axis aligned wireframe 3D box.
Parameters
centerBox center position.
sizeBox extents.
colorBox color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)

Draw a rotated wireframe 3D box.
Parameters
centerBox center position.
rotationBox orientation.
sizeBox extents.
colorBox color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Box3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)

Draw an axis aligned solid 3D box.
Parameters
centerBox center position.
sizeBox extents.
colorBox color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)

Draw a rotated solid 3D box.
Parameters
centerBox center position.
rotationBox orientation.
sizeBox extents.
colorBox color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WirePyramid3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a wireframe 3D pyramid.
Parameters
positionPyramid base position.
rotationPyramid rotation.
heightPyramid height.
widthPyramid base width.
axisPyramid reference axis.
colorPyramid color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Pyramid3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a 3D pyramid.
Parameters
positionPyramid base position.
rotationPyramid rotation.
heightPyramid height.
widthPyramid base width.
axisPyramid reference axis.
colorPyramid color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireRhombus3D (Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a wireframe 3D rhombus.
Parameters
centerRhombus center.
rotationRhombus rotation.
lengthRhombus length.
widthRhombus width.
axisRhombus reference axis.
colorRhombus color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Rhombus3D(Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a 3D rhombus.
Parameters
centerRhombus center.
rotationRhombus rotation.
lengthRhombus length.
widthRhombus width.
axisRhombus reference axis.
colorRhombus color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float radius, float sectorAngle, Color color, float duration = 0.0f)

Draw a solid filled arc in the Y-axis.
Parameters
originArc origin.
rotationArc rotation.
radiusArc radius.
sectorAngleArc angle of sector, in degrees.
colorArc color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float innerRadius, float outerRadius, float directionAngle, float sectorAngle, Color color, float duration = 0.0f)

Draw a solid filled arc in the Y-axis.
Parameters
originArc origin.
rotationArc rotation.
innerRadiusArc inner radius.
outerRadiusArc outer radius.
directionAngleArc angular direction (clockwise), in degrees.
sectorAngleArc angle of sector, in degrees.
colorArc color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a wireframe 3D disc.
Parameters
originDisc origin.
rotationDisc orientation.
radiusDisc radius.
axisOrientation axis.
colorDisc color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Disc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a solid 3D disc.
Parameters
originDisc origin.
rotationDisc orientation.
radiusDisc radius.
axisOrientation axis.
colorDisc color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireSphere3D (Vector3 center, float radius, Color color, float duration = 0.0f)

Draw a wireframe 3D sphere.
Parameters
centerSphere center.
radiusSphere radius.
colorSphere color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireSphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0.0f)

Draw a wireframe 3D sphere.
Parameters
centerSphere center.
rotationSphere rotation.
radiusSphere radius.
colorSphere color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Sphere3D (Vector3 center, float radius, Color color, float duration = 0.0f)

Draw a solid 3D sphere.
Parameters
centerSphere center.
radiusSphere radius.
colorSphere color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0.0f)

Draw a solid 3D sphere.
Parameters
centerSphere center.
rotationSphere rotation.
radiusSphere radius.
colorSphere color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireEllipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)

Draw a wireframe 3D ellipsoid.
Parameters
centerEllipsoid center.
sizeEllipsoid size.
colorEllipsoid color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireEllipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)

Draw a wireframe 3D ellipsoid.
Parameters
centerEllipsoid center.
rotationEllipsoid rotation.
sizeEllipsoid size.
colorEllipsoid color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Ellipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0.0f)

Draw a solid 3D ellipsoid.
Parameters
centerEllipsoid center.
sizeEllipsoid size.
colorEllipsoid color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0.0f)

Draw a solid 3D ellipsoid.
Parameters
centerEllipsoid center.
rotationEllipsoid rotation.
sizeEllipsoid size.
colorEllipsoid color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireCone3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a wireframe 3D cone.
Parameters
positionCone position (origin is located at the base).
rotationCone rotation.
heightCone height.
widthCone base width.
axisCone reference axis.
colorCone color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireCone3D(Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0.0f)

Draw a wireframe 3D cone.
Parameters
originCone start position.
directionCone direction (assumes direction is normalized).
lengthCone length.
angleCone spread angle (in degrees).
colorCone color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Cone3D(Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a 3D cone.
Parameters
positionCone position (origin is located at the base).
rotationCone rotation.
heightCone height.
widthCone base width.
axisCone reference axis.
colorCone color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Cone3D(Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0.0f)

Draw a 3D cone.
Parameters
originCone start position.
directionCone direction (assumes direction is normalized).
lengthCone length.
angleCone spread angle (in degrees).
colorCone color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireCapsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a wireframe 3D capsule.
Parameters
centerCapsule center.
rotationCapsule rotation.
heightCapsule height.
radiusCapsule radius.
axisCapsule reference axis.
colorCapsule color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a solid 3D capsule.
Parameters
centerCapsule center.
rotationCapsule rotation.
heightCapsule height.
radiusCapsule radius.
axisCapsule reference axis.
colorCapsule color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.WireCylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a wireframe 3D cylinder.
Parameters
centerCylinder center.
rotationCylinder rotation.
heightCylinder height.
radiusCylinder radius.
axisCylinder reference axis.
colorCylinder color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a solid 3D cylinder.
Parameters
centerCylinder center.
rotationCylinder rotation.
heightCylinder height.
radiusCylinder radius.
axisCylinder reference axis.
colorCylinder color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Axis3D (Vector3 origin, Quaternion rotation, float length, float alpha, float duration = 0.0f)

Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
originAxis origin.
rotationAxis rotation.
lengthLength of axis lines.
alphaAxis transparency.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Axis3D(Vector3 origin, Quaternion rotation, Vector3 length, float alpha, float duration = 0.0f)

Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
originAxis origin.
rotationAxis rotation.
lengthExtents of axis lines.
alphaAxis transparency.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, IMDrawAxis axis, Color color, float duration = 0.0f)

Draw a 3D grid in a specified plane.
Parameters
originGrid origin.
rotationGrid orientation.
extentXGrid width.
extentYGrid height.
cellsXNumber of cells along the width.
cellsYNumber of cells along the height.
axisThe reference plane for the grid.
colorGrid color.
Back to top

IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, Color color, float duration = 0.0f)

Draw a 3D grid in the X/Z plane.
Parameters
originGrid origin.
rotationGrid orientation.
extentXGrid width.
extentYGrid height.
cellsXNumber of cells along the width.
cellsYNumber of cells along the height.
colorGrid color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.GridPoint3D(Vector3 origin, Quaternion rotation, float extents, Color color, float duration = 0.0f)

Draw a 3D grid point.
Parameters
originGrid point origin.
rotationGrid point orientation.
extentsGrid point extents.
colorGrid point colour.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color, float duration = 0.0f)

Draw a 3D grid point.
Parameters
originGrid point origin.
rotationGrid point orientation.
extentsGrid point XYZ extents.
colorGrid point colour.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Bounds (Bounds bounds, Color color)

Draw 3D bounds (an axis aligned box).
Parameters
boundsBounds that specifies a position and extents.
colorBounds color.
Back to top

IMDraw.Bounds (Renderer renderer, Color color)

Draw the 3D bounds for a renderer (note: only draws bounds if renderer is visible).
Parameters
rendererRenderer whose bounds will be drawn.
colorBounds color.
Back to top

IMDraw.Collider (SphereCollider sphereCollider, Color color, float scaleOffset, bool solid)

Draw a sphere collider shape.
Parameters
sphereColliderTarget SphereCollider object.
colorSphere color.
scaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
solidSpecify if a solid shape should be drawn.
Back to top

IMDraw.Collider (BoxCollider boxCollider, Color color, float scaleOffset, bool solid)

Draw a box collider shape.
Parameters
boxColliderTarget BoxCollider object.
colorBox color.
scaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
solidSpecify if a solid shape should be drawn.
Back to top

IMDraw.Collider (CapsuleCollider capsuleCollider, Color color, float scaleOffset, bool solid)

Draw a capsule collider shape.
Parameters
capsuleColliderCapsuleCollider object.
colorCapsule color.
scaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
solidSpecify if a solid shape should be drawn.
Back to top

IMDraw.Collider (WheelCollider wheelCollider, Color color, float scaleOffset, bool solid)

Draw a wheel collider shape.
Parameters
wheelColliderWheelCollider object.
colorWheel collider color.
scaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
solidSpecify if a solid shape should be drawn.
Back to top

IMDraw.Collider (MeshCollider meshCollider, Color color, float scaleOffset)

Draw a mesh collider shape.
Parameters
meshColliderMeshCollider object.
colorMesh color.
scaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
Back to top

IMDraw.Collider (Collider collider, Color color, float scaleOffset, bool solid)

Draw a collider shape.
Parameters
colliderCollider object.
color
scaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
solidSpecify if a solid shape should be drawn.
Back to top

IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color, float duration = 0.0f)

Draw a mesh.
Parameters
meshMesh object.
positionMesh position.
rotationMesh rotation.
colorMesh color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color, float duration = 0.0f)

Draw a mesh.
Parameters
meshMesh object.
positionMesh position.
rotationMesh rotation.
scale
colorMesh color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Spotlight (Light light, Color wireFrameColor, Color solidColour)

Draw the coverage volume of a spotlight.
Parameters
lightSource spotlight.
wireFrameColorWireframe color.
solidColourSolid color.
Back to top

IMDraw.Frustum (Camera camera, Color color)

Draw a wireframe representation a camera's view frustum.
Parameters
cameraSource camera.
colorFrustum color.
Back to top

IMDraw.Label (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 2D label. [Not VR compatible]
Parameters
xScreen X position.
yScreen Y position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Label(float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 2D label.
Parameters
xScreen X position.
yScreen Y position.
colorLabel color.
fontSizeFont size.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.LabelShadowed(float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 2D label with a drop shadow.
Parameters
xScreen X position.
yScreen Y position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.LabelShadowed(float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 2D label with a drop shadow.
Parameters
xScreen X position.
yScreen Y position.
colorLabel color.
fontSizeFont size.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label.
Parameters
positionLabel 3D position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Label(Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label.
Parameters
positionLabel 3D position.
colorLabel color.
fontSizeFont size.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.LabelShadowed (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label with a drop shadow.
Parameters
positionLabel 3D position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.LabelShadowed(Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label with a drop shadow.
Parameters
positionLabel 3D position.
colorLabel color.
fontSizeFont size.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label.
Parameters
positionLabel 3D position.
positionOffsetXSpecifies an additional screen X position offset.
positionOffsetYSpecifies an additional screen Y position offset.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label.
Parameters
positionLabel 3D position.
positionOffsetXSpecifies an additional screen X position offset.
positionOffsetYSpecifies an additional screen Y position offset.
colorLabel color.
fontSizeFont size.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.LabelShadowed(Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label with a drop shadow.
Parameters
positionLabel 3D position.
positionOffsetXSpecifies an additional screen X position offset.
positionOffsetYSpecifies an additional screen Y position offset.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.LabelShadowed(Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0.0f)

Draw a 3D label with a drop shadow.
Parameters
positionLabel 3D position.
positionOffsetXSpecifies an additional screen X position offset.
positionOffsetYSpecifies an additional screen Y position offset.
colorLabel color.
fontSizeFont size.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

Vector2 IMDraw.GetLabelSize (string text)

Calculate the width and height of text for the current camera GUI font style.
Parameters
textText to be measured.
Returns
Vector2The width & height of the label.
Back to top

IMDraw.RectangleOutline2D (Rect rect, Color color, float duration = 0.0f)

Draw a 2D rectangle outline.
Parameters
rectScreen space position, width and height of the rectangle.
colorOutline color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.RectangleFilled2D (Rect rect, Color color, float duration = 0.0f)

Draw a filled 2D rectangle.
Parameters
rectScreen space position, width and height of the rectangle.
colorFill color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Rectangle2D (Rect rect, Color fillColor, Color outlineColor, float duration = 0.0f)

Draw a 2D rectangle.
Parameters
rectScreen space position, width and height of the rectangle.
fillColorFill color.
outlineColorOutline color.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Image2D(Texture2D texture, Rect rect, Color color, float duration = 0.0f)

Draw a 2D image.
Parameters
textureSource texture.
rectScreen space position, width and height of the rectangle.
texCoordUV coordinates.
colorImage color tint.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Image2D (Texture2D texture, Rect rect, Rect texCoord, Color color, float duration = 0.0f)

Draw a 2D image.
Parameters
textureSource texture.
rectScreen space position, width and height of the rectangle.
texCoordUV coordinates.
colorImage color tint.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.Image2D(Texture2D texture, Rect rect, ScaleMode scaleMode, float aspect, Color color, float duration = 0.0f)

Draw a 2D image.
Parameters
textureSource texture.
rectScreen space position, width and height of the rectangle.
texCoordUV coordinates.
colorImage color tint.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, string label, float duration = 0.0f)

Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
positionText mesh 3D position
scaleText mesh scale.
colorText mesh color.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)

Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
positionText mesh 3D position
scaleText mesh scale.
colorText mesh color.
alignmentHow lines of text are aligned (Left, Right, Center)
anchorThe pivot position of the text mesh.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMeshBillboard(Vector3 position, float widthScale, float heightScale, Color color, string label, float duration = 0.0f)

Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
positionText mesh 3D position.
widthScaleText mesh width scale.
heightScaleText mesh height scale.
colorText mesh color.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMeshBillboard(Vector3 position, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)

Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
positionText mesh 3D position.
widthScaleText mesh width scale.
heightScaleText mesh height scale.
colorText mesh color.
alignmentHow lines of text are aligned (Left, Right, Center)
anchorThe pivot position of the text mesh.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, bool fixedScale, string label, float duration = 0.0f)

Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
positionText mesh 3D position.
scaleText mesh scale.
colorText mesh color.
fixedScaleMaintain screen space scale.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMeshBillboard(Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, bool fixedScale, string label, float duration = 0.0f)

Draw a billboard text mesh. The text mesh will always face the camera.
Parameters
positionText mesh 3D position.
scaleText mesh scale.
colorText mesh color.
alignmentHow lines of text are aligned (Left, Right, Center)
anchorThe pivot position of the text mesh.
fixedScaleMaintain screen space scale.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMesh(Vector3 position, Quaternion rotation, float scale, Color color, string label, float duration = 0.0f)

Draw a 3D text mesh.
Parameters
positionText mesh 3D position.
rotationText mesh rotation.
scaleText mesh scale.
colorText mesh color.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMesh (Vector3 position, Quaternion rotation, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)

Draw a 3D text mesh.
Parameters
positionText mesh 3D position.
rotationText mesh rotation.
scaleText mesh scale.
colorText mesh color.
alignmentHow lines of text are aligned (Left, Right, Center)
anchorThe pivot position of the text mesh.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMesh(Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, string label, float duration = 0.0f)

Draw a 3D text mesh.
Parameters
positionText mesh 3D position.
rotationText mesh rotation.
widthScaleText mesh width scale.
heightScaleText mesh height scale.
colorText mesh color.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMDraw.TextMesh(Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0.0f)

Draw a 3D text mesh.
Parameters
positionText mesh 3D position.
rotationText mesh rotation.
widthScaleText mesh width scale.
heightScaleText mesh height scale.
colorText mesh color.
alignmentHow lines of text are aligned (Left, Right, Center)
anchorThe pivot position of the text mesh.
labelText for the text mesh.
durationDraw duration (in seconds). If this is zero, it will draw for only a single frame.
Back to top

IMGizmos.SetDefaultZTest()

Set current draw mode to use default Z testing (LEqual). Only affects mesh primitives.

Back to top

IMDrawZTest IMGizmos.ZTest

Set/get current draw mode to use specified Z testing. Only affects mesh primitives.

Back to top

IMGizmos.Line3D (Vector3 from, Vector3 to, Color color)

Draw a 3D line.
Parameters
fromStarting point of the line.
toEnding point of the line.
colorLine color.
Back to top

IMGizmos.Ray3D (Ray ray, float length, Color color)

Draw a 3D ray.
Parameters
raySource ray.
lengthLength of line.
colorRay color.
Back to top

IMGizmos.Ray3D (Vector3 origin, Vector3 direction, float length, Color color)

Draw a 3D ray.
Parameters
originOrigin of ray.
directionDirection of ray (assumed to be normalised).
lengthLength of line.
colorRay color.
Back to top

IMGizmos.Ray3D (Vector3 origin, Quaternion rotation, float length, Color color)

Draw a 3D ray.
Parameters
originOrigin of ray.
rotationRay orientation.
lengthRay length.
colorRay color.
Back to top

IMGizmos.WireQuad3D(Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)

Draw a wireframe 3D quad.
Parameters
centerQuad center position.
rotationQuad rotation.
sizeXWidth of quad.
sizeYHeight of quad.
axisOrientation axis of quad.
colorQuad color.
Back to top

IMGizmos.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)

Draw a 3D quad.
Parameters
centerQuad center position.
rotationQuad rotation.
sizeXWidth of quad.
sizeYHeight of quad.
axisOrientation axis of quad.
colorQuad color.
Back to top

IMGizmos.Quad3D(Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)

Draw a 3D quad.
Parameters
centerQuad center position.
rotationQuad rotation.
sizeXWidth of quad.
sizeYHeight of quad.
axisOrientation axis of quad.
solidColorQuad fill color.
wireframeColorQuad wireframe color.
Back to top

IMGizmos.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)

Draw a wireframe 3D box.
Parameters
centerBox center position.
rotationBox orientation.
sizeBox extents.
colorBox color.
Back to top

IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)

Draw a 3D box.
Parameters
centerBox center position.
rotationBox orientation.
sizeBox extents.
colorBox color.
Back to top

IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color solidColor, Color wireframeColor)

Draw a 3D box.
Parameters
centerBox center position.
rotationBox orientation.
sizeBox extents.
solidColorBox fill color.
wireframeColorBox wireframe color.
Back to top

IMGizmos.WirePyramid3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)

Draw a wireframe 3D pyramid.
Parameters
positionPyramid base position.
rotationPyramid rotation.
heightPyramid height.
widthPyramid base width.
axisPyramid reference axis.
colorPyramid color.
Back to top

IMGizmos.Pyramid3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)

Draw a 3D pyramid.
Parameters
positionPyramid base position.
rotationPyramid rotation.
heightPyramid height.
widthPyramid base width.
axisPyramid reference axis.
colorPyramid color.
Back to top

IMGizmos.Pyramid3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)

Draw a 3D pyramid.
Parameters
positionPyramid base position.
rotationPyramid rotation.
heightPyramid height.
widthPyramid base width.
axisPyramid reference axis.
solidColorPyramid fill color.
wireframeColorPyramid wireframe color.
Back to top

IMGizmos.WireRhombus3D(Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)

Draw a wireframe 3D rhombus.
Parameters
centerRhombus center.
rotationRhombus rotation.
lengthRhombus length.
widthRhombus width.
axisRhombus reference axis.
color
Back to top

IMGizmos.Rhombus3D(Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)

Draw a 3D rhombus.
Parameters
centerRhombus center.
rotationRhombus rotation.
lengthRhombus length.
widthRhombus width.
axisRhombus reference axis.
colorRhombus color.
Back to top

IMGizmos.Rhombus3D(Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)

Draw a 3D rhombus.
Parameters
centerRhombus center.
rotationRhombus rotation.
lengthRhombus length.
widthRhombus width.
axisRhombus reference axis.
solidColorRhombus fill color.
wireframeColorRhombus wireframe color.
Back to top

IMGizmos.Arc3D(Vector3 center, Quaternion rotation, float radius, float sectorAngle, Color color)

Draw a solid filled arc in the Y-axis.
Parameters
centerArc center.
rotationArc rotation.
radiusArc radius.
sectorAngleArc angle of sector, in degrees.
colorArc color.
Back to top

IMGizmos.Arc3D(Vector3 center, Quaternion rotation, float innerRadius, float outerRadius, float directionAngle, float sectorAngle, Color color)

Draw a solid filled arc in the Y-axis.
Parameters
centerArc center.
rotationArc rotation.
innerRadiusArc inner radius.
outerRadiusArc outer radius.
directionAngleArc angular direction (clockwise), in degrees.
sectorAngleArc angle of sector, in degrees.
colorArc color.
Back to top

IMGizmos.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)

Draw a wireframe 3D disc.
Parameters
originDisc origin.
rotationDisc orientation.
radiusDisc radius.
axisDisc reference axis.
colorDisc color.
Back to top

IMGizmos.Disc3D(Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)

Draw a 3D disc.
Parameters
originDisc origin.
rotationDisc orientation.
radiusDisc radius.
axisDisc reference axis.
colorDisc color.
Back to top

IMGizmos.Disc3D(Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)

Draw a 3D disc.
Parameters
originDisc origin.
rotationDisc orientation.
radiusDisc radius.
axisDisc reference axis.
solidColorDisc fill color.
wireframeColorDisc wireframe color.
Back to top

IMGizmos.WireSphere3D(Vector3 center, Quaternion rotation, float radius, Color color)

Draw a wireframe 3D sphere.
Parameters
centerSphere center.
rotationSphere radius.
radiusSphere radius.
colorSphere color.
Back to top

IMGizmos.Sphere3D(Vector3 center, Quaternion rotation, float radius, Color color)

Draw a 3D sphere.
Parameters
centerSphere center.
rotationSphere radius.
radiusSphere radius.
colorSphere color.
Back to top

IMGizmos.Sphere3D(Vector3 center, Quaternion rotation, float radius, Color solidColor, Color wireframeColor)

Draw a 3D sphere.
Parameters
centerSphere center.
rotationSphere radius.
radiusSphere radius.
solidColorSphere fill color.
wireframeColorSphere wireframe color.
Back to top

IMGizmos.WireEllipsoid3D(Vector3 center, Quaternion rotation, Vector3 extents, Color color)

Draw a wireframe 3D ellipsoid.
Parameters
centerEllipsoid center.
rotationEllipsoid rotation.
extentsEllipsoid size.
colorEllipsoid color.
Back to top

IMGizmos.Ellipsoid3D(Vector3 center, Quaternion rotation, Vector3 extents, Color color)

Draw a 3D ellipsoid.
Parameters
centerEllipsoid center.
rotationEllipsoid rotation.
extentsEllipsoid size.
colorEllipsoid color.
Back to top

IMGizmos.Ellipsoid3D(Vector3 center, Quaternion rotation, Vector3 extents, Color solidColor, Color wireframeColor)

Draw a 3D ellipsoid.
Parameters
centerEllipsoid center.
rotationEllipsoid rotation.
extentsEllipsoid size.
solidColorEllipsoid fill color.
wireframeColorEllipsoid wireframe color.
Back to top

IMGizmos.WireCone3D(Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)

Draw a wireframe 3D cone.
Parameters
positionCone position (origin is located at the base).
rotationCone rotation.
heightCone height.
widthCone base width.
axisCone reference axis.
colorCone color.
Back to top

IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)

Draw a 3D cone.
Parameters
positionCone position (origin is located at the base).
rotationCone rotation.
heightCone height.
widthCone base width.
axisCone reference axis.
colorCone color.
Back to top

IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)

Draw a 3D cone.
Parameters
positionCone position (origin is located at the base).
rotationCone rotation.
heightCone height.
widthCone base width.
axisCone reference axis.
solidColorCone fill color.
wireframeColorCone wireframe color.
Back to top

IMGizmos.WireCapsule3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)

Draw a wireframe 3D capsule.
Parameters
centerCapsule center.
rotationCapsule rotation.
heightCapsule height.
radiusCapsule radius.
axisCapsule reference axis.
colorCapsule color.
Back to top

IMGizmos.Capsule3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)

Draw a 3D capsule.
Parameters
centerCapsule center.
rotationCapsule rotation.
heightCapsule height.
radiusCapsule radius.
axisCapsule reference axis.
colorCapsule color.
Back to top

IMGizmos.Capsule3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)

Draw a 3D capsule.
Parameters
centerCapsule center.
rotationCapsule rotation.
heightCapsule height.
radiusCapsule radius.
axisCapsule reference axis.
solidColorCapsule fill color.
wireframeColorCapsule wireframe color.
Back to top

IMGizmos.WireCylinder3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)

Draw a wireframe 3D cylinder.
Parameters
centerCylinder center.
rotationCylinder rotation.
heightCylinder height.
radiusCylinder radius.
axisCylinder reference axis.
colorCylinder color.
Back to top

IMGizmos.Cylinder3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)

Draw a 3D cylinder.
Parameters
centerCylinder center.
rotationCylinder rotation.
heightCylinder height.
radiusCylinder radius.
axisCylinder reference axis.
colorCylinder color.
Back to top

IMGizmos.Cylinder3D(Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)

Draw a 3D cylinder.
Parameters
centerCylinder center.
rotationCylinder rotation.
heightCylinder height.
radiusCylinder radius.
axisCylinder reference axis.
solidColorCylinder fill color.
wireframeColorCylinder wireframe color.
Back to top

IMGizmos.WireMesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)

Draw a wireframe mesh.
Parameters
meshSource mesh.
positionMesh position.
rotationMesh rotation.
colorMesh color.
Back to top

IMGizmos.WireMesh(Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)

Draw a wireframe mesh.
Parameters
meshSource mesh.
positionMesh position.
rotationMesh rotation.
scaleMesh scale.
colorMesh color.
Back to top

IMGizmos.WireMesh(Mesh mesh, Transform tf, Color color)

Draw a wireframe mesh.
Parameters
meshSource mesh.
tfMesh transform.
colorMesh color.
Back to top

IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)

Draw a mesh.
Parameters
meshSource mesh.
positionMesh position.
rotationMesh rotation.
colorMesh color.
Back to top

IMGizmos.Mesh(Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)

Draw a mesh.
Parameters
meshSource mesh.
positionMesh position.
rotationMesh rotation.
scaleMesh scale.
colorMesh color.
Back to top

IMGizmos.Mesh(Mesh mesh, Vector3 position, Quaternion rotation, Color solidColor, Color wireframeColor)

Draw a mesh.
Parameters
meshSource mesh.
positionMesh position.
rotationMesh rotation.
solidColorMesh fill color.
wireframeColorMesh wireframe color.
Back to top

IMGizmos.Mesh(Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color solidColor, Color wireframeColor)

Draw a mesh.
Parameters
meshSource mesh.
positionMesh position.
rotationMesh rotation.
scaleMesh scale.
solidColorMesh fill color.
wireframeColorMesh wireframe color.
Back to top

IMGizmos.Axis3D(Vector3 origin, Quaternion rotation, float length, float alpha)

Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
originAxis origin.
rotationAxis rotation.
lengthLength of axis lines.
alphaAxis transparency.
Back to top

IMGizmos.Axis3D(Vector3 origin, Quaternion rotation, Vector3 length, float alpha)

Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
originAxis origin.
rotationAxis rotation.
lengthLength of each axis line.
alphaAxis transparency.
Back to top

IMGizmos.AxisGridPoint3D (Vector3 origin, Quaternion rotation, Vector3 halfLength, float alpha)

Draw a 3-dimensional axis grid point (X-axis=red, Y-axis=green, Z-axis=blue).
Parameters
originAxis origin.
rotationAxis rotation.
halfLengthHalf length of each axis line.
alphaAxis transparency.
Back to top

IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, float extents, Color color)

Draw a 3D grid point.
Parameters
originGrid point origin.
rotationGrid point orientation.
extentsGrid point extents.
colorGrid point colour.
Back to top

IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color)

Draw a 3D grid point.
Parameters
originGrid point origin.
rotationGrid point orientation.
extentsGrid point XYZ extents.
colorGrid point colour.
Back to top

IMGizmos.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, GizmoDrawAxis axis, Color color)

Draw a 3D grid in a specified plane.
Parameters
originGrid origin.
rotationGrid orientation.
extentXGrid width.
extentYGrid height.
cellsXNumber of cells along the width.
cellsYNumber of cells along the height.
axisThe reference plane for the grid.
colorGrid color.
Back to top

IMGizmos.Bounds (Bounds bounds, Color color)

Draw 3D bounds (an axis aligned box).
Parameters
boundsBounds that specifies a position and extents.
colorBounds color.
Back to top

IMGizmos.Bounds (Renderer renderer, Color color)

Draw the 3D bounds for a renderer (note: only draws bounds if renderer is visible).
Parameters
rendererRenderer whose bounds will be drawn.
colorBounds color.
Back to top

IMGizmos.Label(float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, int fontSize = 12)

Draw a label in screen space.
Parameters
xScreen X position.
yScreen Y position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
fontSizeLabel font size.
Back to top

IMGizmos.LabelShadowed(float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, int fontSize = 12)

Draw a label (with drop shadow) in screen space.
Parameters
xScreen X position.
yScreen Y position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
fontSizeLabel font size.
Back to top

IMGizmos.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)

Draw a label in 3D space.
Parameters
positionLabel 3D position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
maxDistMax draw distance from viewer.
fontSizeLabel font size.
Back to top

IMGizmos.LabelShadowed(Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)

Draw a label (with drop shadow) in 3D space.
Parameters
positionLabel 3D position.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
maxDistMax draw distance from viewer.
fontSizeLabel font size.
Back to top

IMGizmos.Label(Vector3 position, float offsetX, float offsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)

Draw a label in 3D space.
Parameters
positionLabel 3D position.
offsetXScreen space X position offset.
offsetYScreen space Y position offset.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
maxDistMax draw distance from viewer.
fontSizeLabel font size.
Back to top

IMGizmos.LabelShadowed (Vector3 position, float offsetX, float offsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)

Draw a label (with drop shadow) in 3D space.
Parameters
positionLabel 3D position.
offsetXScreen space X position offset.
offsetYScreen space Y position offset.
colorLabel color.
pivotLabel rectangle pivot.
alignmentLabel text alignment.
labelLabel text.
maxDistMax draw distance from viewer.
fontSizeLabel font size.
Back to top

IMGizmos.Image (Rect rect, Color color, Texture2D texture)

Draw a texture in screen space.
Parameters
rectScreen position, width and height.
colorTexture color.
textureSource texture.
Back to top