API reference
API reference
Select your platform
No SDKs available
No versions available

DebugGizmos Class

Extends MonoBehaviour
This is a MonoBehaviour responsible for drawing debug gizmos for Immersive Debugger.
It contains methods and configuration options for drawing builtin types within the class. For more info about Immersive Debugger, check out the official doc

Protected Static Fields

_root : DebugGizmos
Signature
DebugGizmos _root

Static Fields

Color : Color
The color (of Unity Color type) used to draw the segments, by default to Black.
Can be adjusted dynamically in runtime.
Signature
Color Color
LineWidth : float
Float indicating the width of the segments that's used for drawing the gizmos, by default to 0.1f.
Can be adjusted dynamically in runtime.
Signature
float LineWidth

Protected Properties

[Get]
Signature
DebugGizmos Root

Properties

RenderSinglePass : bool
[Get][Set]
Indicate whether using single pass rendering, can be updated within runtime dynamically.
If using single pass rendering, duplicate buffer data for the PolylineRenderer
Signature
bool RenderSinglePass

Protected Methods

AddSegment ( p0 , p1 , width , color0 , color1 )
Signature
void AddSegment(Vector3 p0, Vector3 p1, float width, Color color0, Color color1)
Parameters
p0: Vector3
p1: Vector3
width: float
color0: Color
color1: Color
Returns
void
ClearSegments ()
Signature
void ClearSegments()
Returns
void
LateUpdate ()
Signature
virtual void LateUpdate()
Returns
void
OnDisable ()
Signature
virtual void OnDisable()
Returns
void
OnEnable ()
Signature
virtual void OnEnable()
Returns
void
RenderSegments ()
Signature
void RenderSegments()
Returns
void

Static Methods

DrawAxis ( pose , size )
Draw an Axis gizmo using PolylineRenderer segments.
Signature
static void DrawAxis(Pose pose, float size=0.1f)
Parameters
pose: Pose  Pose indicating the position/rotation of the Axis
size: float  Float indicating the length of each Axis line
Returns
void
DrawAxis ( t , size )
Draw an Axis gizmo using PolylineRenderer segments.
Signature
static void DrawAxis(Transform t, float size=0.1f)
Parameters
t: Transform  Transform indicating the position/rotation of the Axis
size: float  Float indicating the length of each Axis line
Returns
void
DrawBox ( pose , width , height , depth , isPivotTopSurface )
Draw a box gizmo using PolylineRenderer segments.
Signature
static void DrawBox(Pose pose, float width, float height, float depth, bool isPivotTopSurface=false)
Parameters
pose: Pose  Pose indicating the origin position and normal of the box (pivot depending on isPivotTopSurface)
width: float  Float indicating the width of the box
height: float  Float indicating the height of the box
depth: float  Float indicating the depth of the box
isPivotTopSurface: bool  Boolean specifying the pivot's Pose is from the middle center of the box or top surface's center, it's usually used as true for Scene anchors
Returns
void
DrawLine ( p0 , p1 , t )
Draw a line gizmo using PolylineRenderer segments.
Signature
static void DrawLine(Vector3 p0, Vector3 p1, Transform t=null)
Parameters
p0: Vector3  Vector3 indicating the starting point of the line
p1: Vector3  Vector3 indicating the ending point of the line
t: Transform  Optional Transform applied on top of the gizmo
Returns
void
DrawPlane ( pose , width , height )
Draw a plane gizmo using PolylineRenderer segments.
Signature
static void DrawPlane(Pose pose, float width, float height)
Parameters
pose: Pose  Pose indicating the origin position and normal of the plane (the center point)
width: float  Float indicating the width of the plane
height: float  Float indicating the height of the plane
Returns
void
DrawPoint ( p0 , t )
Draw a point gizmo using PolylineRenderer segments.
Signature
static void DrawPoint(Vector3 p0, Transform t=null)
Parameters
p0: Vector3  Vector3 indicating the position of the point
t: Transform  Optional Transform applied on top of the gizmo
Returns
void
DrawWireCube ( center , size , t )
Draw a wired cube gizmo using PolylineRenderer segments.
Signature
static void DrawWireCube(Vector3 center, float size, Transform t=null)
Parameters
center: Vector3  Vector3 indicating the center of the cube
size: float  Float indicating the size of the cube
t: Transform  Optional Transform applied on top of the gizmo
Returns
void