Immediate Mode Draw v1.4.5
API Reference

class IMDraw
class IMGizmos
struct IMGizmoLabelStyle
enum IMDrawZTest

class IMDraw

Properties

public static IMDrawZTestIMDraw.ZTestSet/get current draw mode to use specified Z testing. Only affects GL primitives, meshes and text meshes.

Methods

public static void IMDraw.SetTarget (IMDrawCamera camera)
Set a camera as the draw target.

Parameters
IMDrawCameracameraTarget camera.

public static void IMDraw.Flush ()
Flush draw commands on the current target camera.

public static void IMDraw.Flush (IMDrawCamera camera)
Flush draw commands for specified camera.

Parameters
IMDrawCameracameraTarget IMDrawCamera.

public static void IMDraw.FlushAll ()
Flush all draw commands.

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

public static void IMDraw.Line3D (Vector3 from, Vector3 to, Color color, float duration = 0)
Draw a 3D line.

Parameters
Vector3fromStarting point of the line.
Vector3toEnding point of the line.
ColorcolorLine color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Line3D (Vector3 from, Vector3 to, Color fromColor, Color toColor, float duration = 0)
Draw a 3D line.

Parameters
Vector3fromStarting point of the line.
Vector3toEnding point of the line.
ColorfromColorColor of line from the starting point.
ColortoColorColor of line from the ending point.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Ray3D (Ray ray, float length, Color color, float duration = 0)
Draw a 3D ray.

Parameters
RayraySource ray.
floatlengthLength of line.
ColorcolorRay color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Ray3D (Ray ray, float length, Color fromColor, Color toColor, float duration = 0)
Draw a 3D ray.

Parameters
RayraySource ray.
floatlengthLength of line.
ColorfromColorColor of line from the starting point.
ColortoColorColor of line from the ending point.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Ray3D (Vector3 origin, Vector3 direction, float length, Color color, float duration = 0)
Draw a 3D ray.

Parameters
Vector3originOrigin of ray.
Vector3directionDirection of ray (assumed to be normalised).
floatlengthLength of line.
ColorcolorRay color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Ray3D (Vector3 origin, Vector3 direction, float length, Color startColor, Color endColor, float duration = 0)
Draw a 3D ray.

Parameters
Vector3originOrigin of ray.
Vector3directionDirection of ray (assumed to be normalised).
floatlengthLength of line.
ColorstartColorColor of line from starting point of the ray.
ColorendColorColor of line from ending point of the ray.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D quad.

Parameters
Vector3centerQuad center position.
QuaternionrotationQuad rotation.
floatsizeXWidth of quad.
floatsizeYHeight of quad.
IMDrawAxisaxisOrientation axis of quad.
ColorcolorQuad color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireBox3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw an axis aligned wireframe 3D box.

Parameters
Vector3centerBox center position.
Vector3sizeBox extents.
ColorcolorBox color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a rotated wireframe 3D box.

Parameters
Vector3centerBox center position.
QuaternionrotationBox orientation.
Vector3sizeBox extents.
ColorcolorBox color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Box3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw an axis aligned solid 3D box.

Parameters
Vector3centerBox center position.
Vector3sizeBox extents.
ColorcolorBox color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a rotated solid 3D box.

Parameters
Vector3centerBox center position.
QuaternionrotationBox orientation.
Vector3sizeBox extents.
ColorcolorBox color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WirePyramid3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D pyramid.

Parameters
Vector3positionPyramid base position.
QuaternionrotationPyramid rotation.
floatheightPyramid height.
floatwidthPyramid base width.
IMDrawAxisaxisPyramid reference axis.
ColorcolorPyramid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Pyramid3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D pyramid.

Parameters
Vector3positionPyramid base position.
QuaternionrotationPyramid rotation.
floatheightPyramid height.
floatwidthPyramid base width.
IMDrawAxisaxisPyramid reference axis.
ColorcolorPyramid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireRhombus3D (Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D rhombus.

Parameters
Vector3centerRhombus center.
QuaternionrotationRhombus rotation.
floatlengthRhombus length.
floatwidthRhombus width.
IMDrawAxisaxisRhombus reference axis.
ColorcolorRhombus color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Rhombus3D (Vector3 center, Quaternion rotation, float length, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D rhombus.

Parameters
Vector3centerRhombus center.
QuaternionrotationRhombus rotation.
floatlengthRhombus length.
floatwidthRhombus width.
IMDrawAxisaxisRhombus reference axis.
ColorcolorRhombus color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float radius, float sectorAngle, Color color, float duration = 0)
Draw a solid filled arc in the Y-axis.

Parameters
Vector3originArc origin.
QuaternionrotationArc rotation.
floatradiusArc radius.
floatsectorAngleArc angle of sector, in degrees.
ColorcolorArc color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Arc3D (Vector3 origin, Quaternion rotation, float innerRadius, float outerRadius, float directionAngle, float sectorAngle, Color color, float duration = 0)
Draw a solid filled arc in the Y-axis.

Parameters
Vector3originArc origin.
QuaternionrotationArc rotation.
floatinnerRadiusArc inner radius.
floatouterRadiusArc outer radius.
floatdirectionAngleArc angular direction (clockwise), in degrees.
floatsectorAngleArc angle of sector, in degrees.
ColorcolorArc color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D disc.

Parameters
Vector3originDisc origin.
QuaternionrotationDisc orientation.
floatradiusDisc radius.
IMDrawAxisaxisOrientation axis.
ColorcolorDisc color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Disc3D (Vector3 origin, Quaternion rotation, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a solid 3D disc.

Parameters
Vector3originDisc origin.
QuaternionrotationDisc orientation.
floatradiusDisc radius.
IMDrawAxisaxisOrientation axis.
ColorcolorDisc color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireSphere3D (Vector3 center, float radius, Color color, float duration = 0)
Draw a wireframe 3D sphere.

Parameters
Vector3centerSphere center.
floatradiusSphere radius.
ColorcolorSphere color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireSphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0)
Draw a wireframe 3D sphere.

Parameters
Vector3centerSphere center.
QuaternionrotationSphere rotation.
floatradiusSphere radius.
ColorcolorSphere color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Sphere3D (Vector3 center, float radius, Color color, float duration = 0)
Draw a solid 3D sphere.

Parameters
Vector3centerSphere center.
floatradiusSphere radius.
ColorcolorSphere color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color color, float duration = 0)
Draw a solid 3D sphere.

Parameters
Vector3centerSphere center.
QuaternionrotationSphere rotation.
floatradiusSphere radius.
ColorcolorSphere color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireEllipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw a wireframe 3D ellipsoid.

Parameters
Vector3centerEllipsoid center.
Vector3sizeEllipsoid size.
ColorcolorEllipsoid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireEllipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a wireframe 3D ellipsoid.

Parameters
Vector3centerEllipsoid center.
QuaternionrotationEllipsoid rotation.
Vector3sizeEllipsoid size.
ColorcolorEllipsoid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Ellipsoid3D (Vector3 center, Vector3 size, Color color, float duration = 0)
Draw a solid 3D ellipsoid.

Parameters
Vector3centerEllipsoid center.
Vector3sizeEllipsoid size.
ColorcolorEllipsoid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 size, Color color, float duration = 0)
Draw a solid 3D ellipsoid.

Parameters
Vector3centerEllipsoid center.
QuaternionrotationEllipsoid rotation.
Vector3sizeEllipsoid size.
ColorcolorEllipsoid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireCone3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D cone.

Parameters
Vector3positionCone position (origin is located at the base).
QuaternionrotationCone rotation.
floatheightCone height.
floatwidthCone base width.
IMDrawAxisaxisCone reference axis.
ColorcolorCone color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireCone3D (Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0)
Draw a wireframe 3D cone.

Parameters
Vector3originCone start position.
Vector3directionCone direction (assumes direction is normalized).
floatlengthCone length.
floatangleCone spread angle (in degrees).
ColorcolorCone color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Cone3D (Vector3 position, Quaternion rotation, float height, float width, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D cone.

Parameters
Vector3positionCone position (origin is located at the base).
QuaternionrotationCone rotation.
floatheightCone height.
floatwidthCone base width.
IMDrawAxisaxisCone reference axis.
ColorcolorCone color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Cone3D (Vector3 origin, Vector3 direction, float length, float angle, Color color, float duration = 0)
Draw a 3D cone.

Parameters
Vector3originCone start position.
Vector3directionCone direction (assumes direction is normalized).
floatlengthCone length.
floatangleCone spread angle (in degrees).
ColorcolorCone color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireCapsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D capsule.

Parameters
Vector3centerCapsule center.
QuaternionrotationCapsule rotation.
floatheightCapsule height.
floatradiusCapsule radius.
IMDrawAxisaxisCapsule reference axis.
ColorcolorCapsule color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a solid 3D capsule.

Parameters
Vector3centerCapsule center.
QuaternionrotationCapsule rotation.
floatheightCapsule height.
floatradiusCapsule radius.
IMDrawAxisaxisCapsule reference axis.
ColorcolorCapsule color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.WireCylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a wireframe 3D cylinder.

Parameters
Vector3centerCylinder center.
QuaternionrotationCylinder rotation.
floatheightCylinder height.
floatradiusCylinder radius.
IMDrawAxisaxisCylinder reference axis.
ColorcolorCylinder color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, IMDrawAxis axis, Color color, float duration = 0)
Draw a solid 3D cylinder.

Parameters
Vector3centerCylinder center.
QuaternionrotationCylinder rotation.
floatheightCylinder height.
floatradiusCylinder radius.
IMDrawAxisaxisCylinder reference axis.
ColorcolorCylinder color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Axis3D (Vector3 origin, Quaternion rotation, float length, float alpha, float duration = 0)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).

Parameters
Vector3originAxis origin.
QuaternionrotationAxis rotation.
floatlengthLength of axis lines.
floatalphaAxis transparency.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Axis3D (Vector3 origin, Quaternion rotation, Vector3 length, float alpha, float duration = 0)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).

Parameters
Vector3originAxis origin.
QuaternionrotationAxis rotation.
Vector3lengthExtents of axis lines.
floatalphaAxis transparency.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, IMDrawAxis axis, Color color, float duration = 0)
Draw a 3D grid in a specified plane.

Parameters
Vector3originGrid origin.
QuaternionrotationGrid orientation.
floatextentXGrid width.
floatextentYGrid height.
intcellsXNumber of cells along the width.
intcellsYNumber of cells along the height.
IMDrawAxisaxisThe reference plane for the grid.
ColorcolorGrid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Grid3D (Vector3 origin, Quaternion rotation, float extentX, float extentY, int cellsX, int cellsY, Color color, float duration = 0)
Draw a 3D grid in the X/Z plane.

Parameters
Vector3originGrid origin.
QuaternionrotationGrid orientation.
floatextentXGrid width.
floatextentYGrid height.
intcellsXNumber of cells along the width.
intcellsYNumber of cells along the height.
ColorcolorGrid color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.GridPoint3D (Vector3 origin, Quaternion rotation, float extents, Color color, float duration = 0)
Draw a 3D grid point.

Parameters
Vector3originGrid point origin.
QuaternionrotationGrid point orientation.
floatextentsGrid point extents.
ColorcolorGrid point colour.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color, float duration = 0)
Draw a 3D grid point.

Parameters
Vector3originGrid point origin.
QuaternionrotationGrid point orientation.
Vector3extentsGrid point XYZ extents.
ColorcolorGrid point colour.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Bounds (Bounds bounds, Color color)
Draw 3D bounds (an axis aligned box).

Parameters
BoundsboundsBounds that specifies a position and extents.
ColorcolorBounds color.

public static void IMDraw.Bounds (Renderer renderer, Color color)
Draw the 3D bounds for a renderer (note: only draws bounds if renderer is visible).

Parameters
RendererrendererRenderer whose bounds will be drawn.
ColorcolorBounds color.

public static void IMDraw.Collider (SphereCollider sphereCollider, Color color, float scaleOffset, bool solid)
Draw a sphere collider shape.

Parameters
SphereCollidersphereColliderTarget SphereCollider object.
ColorcolorSphere color.
floatscaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
boolsolidSpecify if a solid shape should be drawn.

public static void IMDraw.Collider (BoxCollider boxCollider, Color color, float scaleOffset, bool solid)
Draw a box collider shape.

Parameters
BoxColliderboxColliderTarget BoxCollider object.
ColorcolorBox color.
floatscaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
boolsolidSpecify if a solid shape should be drawn.

public static void IMDraw.Collider (CapsuleCollider capsuleCollider, Color color, float scaleOffset, bool solid)
Draw a capsule collider shape.

Parameters
CapsuleCollidercapsuleColliderCapsuleCollider object.
ColorcolorCapsule color.
floatscaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
boolsolidSpecify if a solid shape should be drawn.

public static void IMDraw.Collider (WheelCollider wheelCollider, Color color, float scaleOffset, bool solid)
Draw a wheel collider shape.

Parameters
WheelColliderwheelColliderWheelCollider object.
ColorcolorWheel collider color.
floatscaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
boolsolidSpecify if a solid shape should be drawn.

public static void IMDraw.Collider (MeshCollider meshCollider, Color color, float scaleOffset)
Draw a mesh collider shape. Note: wireframe not currently supported.

Parameters
MeshCollidermeshColliderMeshCollider object.
ColorcolorMesh color.
floatscaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.

public static void IMDraw.Collider (Collider collider, Color color, float scaleOffset, bool solid)
Draw a collider shape.

Parameters
CollidercolliderCollider object.
ColorcolorMesh color.
floatscaleOffsetSpecify a scale offset (0=no scale change). Useful for situations where the visualisation overlaps geometry.
boolsolidSpecify if a solid shape should be drawn. Note: MeshCollider always drawn as solid, wireframe not currently supported.

public static void IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color, float duration = 0)
Draw a mesh.

Parameters
MeshmeshMesh object.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
ColorcolorMesh color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color, float duration = 0)
Draw a mesh.

Parameters
MeshmeshMesh object.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
Vector3scaleMesh scale.
ColorcolorMesh color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Spotlight (Light light, Color wireFrameColor, Color solidColour)
Draw the coverage volume of a spotlight.

Parameters
LightlightSource spotlight.
ColorwireFrameColorWireframe color.
ColorsolidColourSolid color.

public static void IMDraw.Frustum (Camera camera, Color color)
Draw a wireframe representation a camera's view frustum.

Parameters
CameracameraSource camera.
ColorcolorFrustum color.

public static void IMDraw.Label (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label. [Not VR compatible]

Parameters
floatxScreen X position.
floatyScreen Y position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Label (float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label.

Parameters
floatxScreen X position.
floatyScreen Y position.
ColorcolorLabel color.
intfontSizeFont size.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.LabelShadowed (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label with a drop shadow.

Parameters
floatxScreen X position.
floatyScreen Y position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.LabelShadowed (float x, float y, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 2D label with a drop shadow.

Parameters
floatxScreen X position.
floatyScreen Y position.
ColorcolorLabel color.
intfontSizeFont size.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.

Parameters
Vector3positionLabel 3D position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Label (Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.

Parameters
Vector3positionLabel 3D position.
ColorcolorLabel color.
intfontSizeFont size.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.LabelShadowed (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.

Parameters
Vector3positionLabel 3D position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.LabelShadowed (Vector3 position, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.

Parameters
Vector3positionLabel 3D position.
ColorcolorLabel color.
intfontSizeFont size.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.

Parameters
Vector3positionLabel 3D position.
floatpositionOffsetXSpecifies an additional screen X position offset.
floatpositionOffsetYSpecifies an additional screen Y position offset.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Label (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label.

Parameters
Vector3positionLabel 3D position.
floatpositionOffsetXSpecifies an additional screen X position offset.
floatpositionOffsetYSpecifies an additional screen Y position offset.
ColorcolorLabel color.
intfontSizeFont size.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.LabelShadowed (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.

Parameters
Vector3positionLabel 3D position.
floatpositionOffsetXSpecifies an additional screen X position offset.
floatpositionOffsetYSpecifies an additional screen Y position offset.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.LabelShadowed (Vector3 position, float positionOffsetX, float positionOffsetY, Color color, int fontSize, LabelPivot pivot, LabelAlignment alignment, string label, float duration = 0)
Draw a 3D label with a drop shadow.

Parameters
Vector3positionLabel 3D position.
floatpositionOffsetXSpecifies an additional screen X position offset.
floatpositionOffsetYSpecifies an additional screen Y position offset.
ColorcolorLabel color.
intfontSizeFont size.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.RectangleOutline2D (Rect rect, Color color, float duration = 0)
Draw a 2D rectangle outline.

Parameters
RectrectScreen space position, width and height of the rectangle.
ColorcolorOutline color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.RectangleFilled2D (Rect rect, Color color, float duration = 0)
Draw a filled 2D rectangle.

Parameters
RectrectScreen space position, width and height of the rectangle.
ColorcolorFill color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Rectangle2D (Rect rect, Color fillColor, Color outlineColor, float duration = 0)
Draw a 2D rectangle.

Parameters
RectrectScreen space position, width and height of the rectangle.
ColorfillColorFill color.
ColoroutlineColorOutline color.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Image2D (Texture2D texture, Rect rect, Color color, float duration = 0)
Draw a 2D image.

Parameters
Texture2DtextureSource texture.
RectrectScreen space position, width and height of the rectangle.
ColorcolorImage color tint.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Image2D (Texture2D texture, Rect rect, Rect texCoord, Color color, float duration = 0)
Draw a 2D image.

Parameters
Texture2DtextureSource texture.
RectrectScreen space position, width and height of the rectangle.
RecttexCoordUV coordinates.
ColorcolorImage color tint.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.Image2D (Texture2D texture, Rect rect, ScaleMode scaleMode, float aspect, Color color, float duration = 0)
Draw a 2D image.

Parameters
Texture2DtextureSource texture.
RectrectScreen space position, width and height of the rectangle.
ScaleModescaleModeTexture scaling mode.
floataspectAspect ratio to use for the source image. If 0 (the default), the aspect ratio from the image is used. Pass in w/h for the desired aspect ratio.
ColorcolorImage color tint.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.

Parameters
Vector3positionText mesh 3D position
floatscaleText mesh scale.
ColorcolorText mesh color.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.

Parameters
Vector3positionText mesh 3D position
floatscaleText mesh scale.
ColorcolorText mesh color.
TextAlignmentalignmentHow lines of text are aligned (Left, Right, Center)
TextAnchoranchorThe pivot position of the text mesh.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMeshBillboard (Vector3 position, float widthScale, float heightScale, Color color, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.

Parameters
Vector3positionText mesh 3D position.
floatwidthScaleText mesh width scale.
floatheightScaleText mesh height scale.
ColorcolorText mesh color.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMeshBillboard (Vector3 position, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.

Parameters
Vector3positionText mesh 3D position.
floatwidthScaleText mesh width scale.
floatheightScaleText mesh height scale.
ColorcolorText mesh color.
TextAlignmentalignmentHow lines of text are aligned (Left, Right, Center)
TextAnchoranchorThe pivot position of the text mesh.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, bool fixedScale, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.

Parameters
Vector3positionText mesh 3D position.
floatscaleText mesh scale.
ColorcolorText mesh color.
boolfixedScaleMaintain screen space scale.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMeshBillboard (Vector3 position, float scale, Color color, TextAlignment alignment, TextAnchor anchor, bool fixedScale, string label, float duration = 0)
Draw a billboard text mesh. The text mesh will always face the camera.

Parameters
Vector3positionText mesh 3D position.
floatscaleText mesh scale.
ColorcolorText mesh color.
TextAlignmentalignmentHow lines of text are aligned (Left, Right, Center)
TextAnchoranchorThe pivot position of the text mesh.
boolfixedScaleMaintain screen space scale.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float scale, Color color, string label, float duration = 0)
Draw a 3D text mesh.

Parameters
Vector3positionText mesh 3D position.
QuaternionrotationText mesh rotation.
floatscaleText mesh scale.
ColorcolorText mesh color.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float scale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a 3D text mesh.

Parameters
Vector3positionText mesh 3D position.
QuaternionrotationText mesh rotation.
floatscaleText mesh scale.
ColorcolorText mesh color.
TextAlignmentalignmentHow lines of text are aligned (Left, Right, Center)
TextAnchoranchorThe pivot position of the text mesh.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, string label, float duration = 0)
Draw a 3D text mesh.

Parameters
Vector3positionText mesh 3D position.
QuaternionrotationText mesh rotation.
floatwidthScaleText mesh width scale.
floatheightScaleText mesh height scale.
ColorcolorText mesh color.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.

public static void IMDraw.TextMesh (Vector3 position, Quaternion rotation, float widthScale, float heightScale, Color color, TextAlignment alignment, TextAnchor anchor, string label, float duration = 0)
Draw a 3D text mesh.

Parameters
Vector3positionText mesh 3D position.
QuaternionrotationText mesh rotation.
floatwidthScaleText mesh width scale.
floatheightScaleText mesh height scale.
ColorcolorText mesh color.
TextAlignmentalignmentHow lines of text are aligned (Left, Right, Center)
TextAnchoranchorThe pivot position of the text mesh.
stringlabelText for the text mesh.
floatduration = 0Draw duration (in seconds). If this is zero, it will draw for only a single frame.


class IMGizmos

Properties

public static IMDrawZTestIMGizmos.ZTestSet/get current draw mode to use specified Z testing. Only affects mesh primitives.

Methods

public static void IMGizmos.SetDefaultZTest ()
Set current draw mode to use default Z testing (LEqual). Only affects mesh primitives.

public static void IMGizmos.Line3D (Vector3 from, Vector3 to, Color color)
Draw a 3D line.

Parameters
Vector3fromStarting point of the line.
Vector3toEnding point of the line.
ColorcolorLine color.

public static void IMGizmos.Ray3D (Ray ray, float length, Color color)
Draw a 3D ray.

Parameters
RayraySource ray.
floatlengthLength of line.
ColorcolorRay color.

public static void IMGizmos.Ray3D (Vector3 origin, Vector3 direction, float length, Color color)
Draw a 3D ray.

Parameters
Vector3originOrigin of ray.
Vector3directionDirection of ray (assumed to be normalised).
floatlengthLength of line.
ColorcolorRay color.

public static void IMGizmos.Ray3D (Vector3 origin, Quaternion rotation, float length, Color color)
Draw a 3D ray.

Parameters
Vector3originOrigin of ray.
QuaternionrotationRay orientation.
floatlengthRay length.
ColorcolorRay color.

public static void IMGizmos.WireQuad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D quad.

Parameters
Vector3centerQuad center position.
QuaternionrotationQuad rotation.
floatsizeXWidth of quad.
floatsizeYHeight of quad.
GizmoDrawAxisaxisOrientation axis of quad.
ColorcolorQuad color.

public static void IMGizmos.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color color)
Draw a 3D quad.

Parameters
Vector3centerQuad center position.
QuaternionrotationQuad rotation.
floatsizeXWidth of quad.
floatsizeYHeight of quad.
GizmoDrawAxisaxisOrientation axis of quad.
ColorcolorQuad color.

public static void IMGizmos.Quad3D (Vector3 center, Quaternion rotation, float sizeX, float sizeY, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D quad.

Parameters
Vector3centerQuad center position.
QuaternionrotationQuad rotation.
floatsizeXWidth of quad.
floatsizeYHeight of quad.
GizmoDrawAxisaxisOrientation axis of quad.
ColorsolidColorQuad fill color.
ColorwireframeColorQuad wireframe color.

public static void IMGizmos.WireBox3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)
Draw a wireframe 3D box.

Parameters
Vector3centerBox center position.
QuaternionrotationBox orientation.
Vector3sizeBox extents.
ColorcolorBox color.

public static void IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color color)
Draw a 3D box.

Parameters
Vector3centerBox center position.
QuaternionrotationBox orientation.
Vector3sizeBox extents.
ColorcolorBox color.

public static void IMGizmos.Box3D (Vector3 center, Quaternion rotation, Vector3 size, Color solidColor, Color wireframeColor)
Draw a 3D box.

Parameters
Vector3centerBox center position.
QuaternionrotationBox orientation.
Vector3sizeBox extents.
ColorsolidColorBox fill color.
ColorwireframeColorBox wireframe color.

public static void IMGizmos.WirePyramid3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D pyramid.

Parameters
Vector3positionPyramid base position.
QuaternionrotationPyramid rotation.
floatheightPyramid height.
floatwidthPyramid base width.
GizmoDrawAxisaxisPyramid reference axis.
ColorcolorPyramid color.

public static void IMGizmos.Pyramid3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a 3D pyramid.

Parameters
Vector3positionPyramid base position.
QuaternionrotationPyramid rotation.
floatheightPyramid height.
floatwidthPyramid base width.
GizmoDrawAxisaxisPyramid reference axis.
ColorcolorPyramid color.

public static void IMGizmos.Pyramid3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D pyramid.

Parameters
Vector3positionPyramid base position.
QuaternionrotationPyramid rotation.
floatheightPyramid height.
floatwidthPyramid base width.
GizmoDrawAxisaxisPyramid reference axis.
ColorsolidColorPyramid fill color.
ColorwireframeColorPyramid wireframe color.

public static void IMGizmos.WireRhombus3D (Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D rhombus.

Parameters
Vector3centerRhombus center.
QuaternionrotationRhombus rotation.
floatlengthRhombus length.
floatwidthRhombus width.
GizmoDrawAxisaxisRhombus reference axis.
ColorcolorRhombus color.

public static void IMGizmos.Rhombus3D (Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color color)
Draw a 3D rhombus.

Parameters
Vector3centerRhombus center.
QuaternionrotationRhombus rotation.
floatlengthRhombus length.
floatwidthRhombus width.
GizmoDrawAxisaxisRhombus reference axis.
ColorcolorRhombus color.

public static void IMGizmos.Rhombus3D (Vector3 center, Quaternion rotation, float length, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D rhombus.

Parameters
Vector3centerRhombus center.
QuaternionrotationRhombus rotation.
floatlengthRhombus length.
floatwidthRhombus width.
GizmoDrawAxisaxisRhombus reference axis.
ColorsolidColorRhombus fill color.
ColorwireframeColorRhombus wireframe color.

public static void IMGizmos.Arc3D (Vector3 center, Quaternion rotation, float radius, float sectorAngle, Color color)
Draw a solid filled arc in the Y-axis.

Parameters
Vector3centerArc center.
QuaternionrotationArc rotation.
floatradiusArc radius.
floatsectorAngleArc angle of sector, in degrees.
ColorcolorArc color.

public static void 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
Vector3centerArc center.
QuaternionrotationArc rotation.
floatinnerRadiusArc inner radius.
floatouterRadiusArc outer radius.
floatdirectionAngleArc angular direction (clockwise), in degrees.
floatsectorAngleArc angle of sector, in degrees.
ColorcolorArc color.

public static void IMGizmos.WireDisc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D disc.

Parameters
Vector3originDisc origin.
QuaternionrotationDisc orientation.
floatradiusDisc radius.
GizmoDrawAxisaxisDisc reference axis.
ColorcolorDisc color.

public static void IMGizmos.Disc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color color)
Draw a 3D disc.

Parameters
Vector3originDisc origin.
QuaternionrotationDisc orientation.
floatradiusDisc radius.
GizmoDrawAxisaxisDisc reference axis.
ColorcolorDisc color.

public static void IMGizmos.Disc3D (Vector3 origin, Quaternion rotation, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D disc.

Parameters
Vector3originDisc origin.
QuaternionrotationDisc orientation.
floatradiusDisc radius.
GizmoDrawAxisaxisDisc reference axis.
ColorsolidColorDisc fill color.
ColorwireframeColorDisc wireframe color.

public static void IMGizmos.WireSphere3D (Vector3 center, Quaternion rotation, float radius, Color color)
Draw a wireframe 3D sphere.

Parameters
Vector3centerSphere center.
QuaternionrotationSphere radius.
floatradiusSphere radius.
ColorcolorSphere color.

public static void IMGizmos.Sphere3D (Vector3 center, float radius, Color color)
Draw a 3D sphere.

Parameters
Vector3centerSphere center.
floatradiusSphere radius.
ColorcolorSphere color.

public static void IMGizmos.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color color)
Draw a 3D sphere.

Parameters
Vector3centerSphere center.
QuaternionrotationSphere radius.
floatradiusSphere radius.
ColorcolorSphere color.

public static void IMGizmos.Sphere3D (Vector3 center, Quaternion rotation, float radius, Color solidColor, Color wireframeColor)
Draw a 3D sphere.

Parameters
Vector3centerSphere center.
QuaternionrotationSphere radius.
floatradiusSphere radius.
ColorsolidColorSphere fill color.
ColorwireframeColorSphere wireframe color.

public static void IMGizmos.WireEllipsoid3D (Vector3 center, Quaternion rotation, Vector3 extents, Color color)
Draw a wireframe 3D ellipsoid.

Parameters
Vector3centerEllipsoid center.
QuaternionrotationEllipsoid rotation.
Vector3extentsEllipsoid size.
ColorcolorEllipsoid color.

public static void IMGizmos.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 extents, Color color)
Draw a 3D ellipsoid.

Parameters
Vector3centerEllipsoid center.
QuaternionrotationEllipsoid rotation.
Vector3extentsEllipsoid size.
ColorcolorEllipsoid color.

public static void IMGizmos.Ellipsoid3D (Vector3 center, Quaternion rotation, Vector3 extents, Color solidColor, Color wireframeColor)
Draw a 3D ellipsoid.

Parameters
Vector3centerEllipsoid center.
QuaternionrotationEllipsoid rotation.
Vector3extentsEllipsoid size.
ColorsolidColorEllipsoid fill color.
ColorwireframeColorEllipsoid wireframe color.

public static void IMGizmos.WireCone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D cone.

Parameters
Vector3positionCone position (origin is located at the base).
QuaternionrotationCone rotation.
floatheightCone height.
floatwidthCone base width.
GizmoDrawAxisaxisCone reference axis.
ColorcolorCone color.

public static void IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color color)
Draw a 3D cone.

Parameters
Vector3positionCone position (origin is located at the base).
QuaternionrotationCone rotation.
floatheightCone height.
floatwidthCone base width.
GizmoDrawAxisaxisCone reference axis.
ColorcolorCone color.

public static void IMGizmos.Cone3D (Vector3 position, Quaternion rotation, float height, float width, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D cone.

Parameters
Vector3positionCone position (origin is located at the base).
QuaternionrotationCone rotation.
floatheightCone height.
floatwidthCone base width.
GizmoDrawAxisaxisCone reference axis.
ColorsolidColorCone fill color.
ColorwireframeColorCone wireframe color.

public static void IMGizmos.WireCapsule3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D capsule.

Parameters
Vector3centerCapsule center.
QuaternionrotationCapsule rotation.
floatheightCapsule height.
floatradiusCapsule radius.
GizmoDrawAxisaxisCapsule reference axis.
ColorcolorCapsule color.

public static void IMGizmos.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a 3D capsule.

Parameters
Vector3centerCapsule center.
QuaternionrotationCapsule rotation.
floatheightCapsule height.
floatradiusCapsule radius.
GizmoDrawAxisaxisCapsule reference axis.
ColorcolorCapsule color.

public static void IMGizmos.Capsule3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D capsule.

Parameters
Vector3centerCapsule center.
QuaternionrotationCapsule rotation.
floatheightCapsule height.
floatradiusCapsule radius.
GizmoDrawAxisaxisCapsule reference axis.
ColorsolidColorCapsule fill color.
ColorwireframeColorCapsule wireframe color.

public static void IMGizmos.WireCylinder3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a wireframe 3D cylinder.

Parameters
Vector3centerCylinder center.
QuaternionrotationCylinder rotation.
floatheightCylinder height.
floatradiusCylinder radius.
GizmoDrawAxisaxisCylinder reference axis.
ColorcolorCylinder color.

public static void IMGizmos.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color color)
Draw a 3D cylinder.

Parameters
Vector3centerCylinder center.
QuaternionrotationCylinder rotation.
floatheightCylinder height.
floatradiusCylinder radius.
GizmoDrawAxisaxisCylinder reference axis.
ColorcolorCylinder color.

public static void IMGizmos.Cylinder3D (Vector3 center, Quaternion rotation, float height, float radius, GizmoDrawAxis axis, Color solidColor, Color wireframeColor)
Draw a 3D cylinder.

Parameters
Vector3centerCylinder center.
QuaternionrotationCylinder rotation.
floatheightCylinder height.
floatradiusCylinder radius.
GizmoDrawAxisaxisCylinder reference axis.
ColorsolidColorCylinder fill color.
ColorwireframeColorCylinder wireframe color.

public static void IMGizmos.WireMesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)
Draw a wireframe mesh.

Parameters
MeshmeshSource mesh.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
ColorcolorMesh color.

public static void IMGizmos.WireMesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)
Draw a wireframe mesh.

Parameters
MeshmeshSource mesh.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
Vector3scaleMesh scale.
ColorcolorMesh color.

public static void IMGizmos.WireMesh (Mesh mesh, Transform tf, Color color)
Draw a wireframe mesh.

Parameters
MeshmeshSource mesh.
TransformtfMesh transform.
ColorcolorMesh color.

public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color color)
Draw a mesh.

Parameters
MeshmeshSource mesh.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
ColorcolorMesh color.

public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color color)
Draw a mesh.

Parameters
MeshmeshSource mesh.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
Vector3scaleMesh scale.
ColorcolorMesh color.

public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Color solidColor, Color wireframeColor)
Draw a mesh.

Parameters
MeshmeshSource mesh.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
ColorsolidColorMesh fill color.
ColorwireframeColorMesh wireframe color.

public static void IMGizmos.Mesh (Mesh mesh, Vector3 position, Quaternion rotation, Vector3 scale, Color solidColor, Color wireframeColor)
Draw a mesh.

Parameters
MeshmeshSource mesh.
Vector3positionMesh position.
QuaternionrotationMesh rotation.
Vector3scaleMesh scale.
ColorsolidColorMesh fill color.
ColorwireframeColorMesh wireframe color.

public static void IMGizmos.Axis3D (Vector3 origin, Quaternion rotation, float length, float alpha = 1)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).

Parameters
Vector3originAxis origin.
QuaternionrotationAxis rotation.
floatlengthLength of axis lines.
floatalpha = 1Axis transparency.

public static void IMGizmos.Axis3D (Vector3 origin, Quaternion rotation, Vector3 length, float alpha = 1)
Draw a 3-dimensional axis (X-axis=red, Y-axis=green, Z-axis=blue).

Parameters
Vector3originAxis origin.
QuaternionrotationAxis rotation.
Vector3lengthLength of each axis line.
floatalpha = 1Axis transparency.

public static void 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
Vector3originAxis origin.
QuaternionrotationAxis rotation.
Vector3halfLengthHalf length of each axis line.
floatalphaAxis transparency.

public static void IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, float extents, Color color)
Draw a 3D grid point.

Parameters
Vector3originGrid point origin.
QuaternionrotationGrid point orientation.
floatextentsGrid point extents.
ColorcolorGrid point colour.

public static void IMGizmos.GridPoint3D (Vector3 origin, Quaternion rotation, Vector3 extents, Color color)
Draw a 3D grid point.

Parameters
Vector3originGrid point origin.
QuaternionrotationGrid point orientation.
Vector3extentsGrid point XYZ extents.
ColorcolorGrid point colour.

public static void 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
Vector3originGrid origin.
QuaternionrotationGrid orientation.
floatextentXGrid width.
floatextentYGrid height.
intcellsXNumber of cells along the width.
intcellsYNumber of cells along the height.
GizmoDrawAxisaxisThe reference plane for the grid.
ColorcolorGrid color.

public static void IMGizmos.Bounds (Bounds bounds, Color color)
Draw 3D bounds (an axis aligned box).

Parameters
BoundsboundsBounds that specifies a position and extents.
ColorcolorBounds color.

public static void IMGizmos.Bounds (Renderer renderer, Color color)
Draw the 3D bounds for a renderer (note: only draws bounds if renderer is visible).

Parameters
RendererrendererRenderer whose bounds will be drawn.
ColorcolorBounds color.

public static void IMGizmos.Collider (Collider collider, Color color)
Draw a collider as a wireframe shape. Note: MeshCollider not currently supported.

Parameters
CollidercolliderCollider object.
ColorcolorWireframe color.

public static void IMGizmos.Label (float x, float y, Color color, LabelPivot pivot, LabelAlignment alignment, string label, int fontSize = 12)
Draw a label in screen space.

Parameters
floatxScreen X position.
floatyScreen Y position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
intfontSize = 12Label font size.

public static void 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
floatxScreen X position.
floatyScreen Y position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
intfontSize = 12Label font size.

public static void IMGizmos.Label (Vector3 position, Color color, LabelPivot pivot, LabelAlignment alignment, string label, float maxDist, int fontSize = 12)
Draw a label in 3D space.

Parameters
Vector3positionLabel 3D position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatmaxDistMax draw distance from viewer.
intfontSize = 12Label font size.

public static void 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
Vector3positionLabel 3D position.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatmaxDistMax draw distance from viewer.
intfontSize = 12Label font size.

public static void 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
Vector3positionLabel 3D position.
floatoffsetXScreen space X position offset.
floatoffsetYScreen space Y position offset.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatmaxDistMax draw distance from viewer.
intfontSize = 12Label font size.

public static void 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
Vector3positionLabel 3D position.
floatoffsetXScreen space X position offset.
floatoffsetYScreen space Y position offset.
ColorcolorLabel color.
LabelPivotpivotLabel rectangle pivot.
LabelAlignmentalignmentLabel text alignment.
stringlabelLabel text.
floatmaxDistMax draw distance from viewer.
intfontSize = 12Label font size.

public static void IMGizmos.Label (Vector3 position, IMGizmoLabelStyle style, string label)
Draw a label in 3D space.

Parameters
Vector3positionLabel 3D position.
IMGizmoLabelStylestyleStyle parameters for how the text should be displayed.
stringlabelLabel text.

public static void IMGizmos.Label (Vector3 position, ref IMGizmoLabelStyle style, string label)
Draw a label in 3D space.

Parameters
Vector3positionLabel 3D position.
ref IMGizmoLabelStylestyleStyle parameters for how the text should be displayed.
stringlabelLabel text.

public static void IMGizmos.Image (Rect rect, Color color, Texture2D texture)
Draw a texture in screen space.

Parameters
RectrectScreen position, width and height.
ColorcolorTexture color.
Texture2DtextureSource texture.


struct IMGizmoLabelStyle
Style parameters for a gizmo label.

Fields

public UnityEngine.ColorcolorRGBA color.
public LabelPivotpivotThe center point location of the text bounding rectangle.
public LabelAlignmentalignmentText alignment.
public UnityEngine.FontStylefontStyleFont style.
public intfontSizeFont size.
public floatmaxDrawDistanceMaximum draw distance from viewer.
public boolshadowedSpecify text should have a drop shadow.
public floatoffsetXScreen space X position offset.
public floatoffsetYScreen space Y position offset.

enum IMDrawZTest
Depth comparison function.

Values

DisabledDepth or stencil test is disabled.
NeverNever pass depth or stencil test.
LessPass depth or stencil test when new value is less than current value.
EqualPass depth or stencil test when values are equal.
LessEqualDefault value. Pass depth or stencil test when new value is less or equal than current value.
GreaterPass depth or stencil test when new value is greater than current value.
NotEqualPass depth or stencil test when values are different.
GreaterEqualPass depth or stencil test when new value is greater or equal than current value.
AlwaysAlways pass depth or stencil test.