Twoorb Plugins  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Twoorb.Utilities.DebugPainterMono Class Reference

The MonoBehaviour class that draws debug meshes. Must be attached to a camera to work. To switch the use from Camera.main - use SetDebugDrawCamera(Camera camera) - method. More...

Inheritance diagram for Twoorb.Utilities.DebugPainterMono:

Public Member Functions

void DrawLine (DebugLine debugLine)
 Adds a draw line object operation to the drawing queue. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugLine to get line objects to use for drawing. More...
 
void DrawBounds (DebugBounds debugBounds)
 Adds a draw bounds object operation to the drawing queue. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugBounds to get bounds objects to use for drawing. More...
 
void DrawCircle (DebugCircle debugCircle)
 Adds a draw circle object operation to the drawing queue. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugCircle to get circle objects to use for drawing. More...
 
void DrawSphere (DebugCircle debugCircle)
 Adds a draw circle object operation to the drawing queue for sphere. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugCircle to get circle objects to use for drawing spheres. More...
 
DebugLine GetEmptyDebugLine ()
 Gets an empty unused DebugLine object from the pool, creates a new if none is available. Use this method instead of creating a new object yourself. More...
 
DebugBounds GetEmptyDebugBounds ()
 Gets an empty unused DebugBounds object from the pool, creates a new if none is available. Use this method instead of creating a new object yourself. More...
 
DebugCircle GetEmptyDebugCircle ()
 Gets an empty unused DebugCircle object from the pool, creates a new if none is available. Use this method instead of creating a new object yourself. More...
 

Static Public Member Functions

static DebugPainterMono GetPainter ()
 Gets the static DebugPainterObject. If there is none available, one will be created and attached to the camera object. Attaches to the Camera.main object by default. If you wish to use another camera, use the SetDebugDrawCamera(Camera camera) - method; More...
 
static void SetDebugDrawCamera (Camera camera)
 Sets the camera to attach the debug draw on when using the GetPainter() method. More...
 

Detailed Description

The MonoBehaviour class that draws debug meshes. Must be attached to a camera to work. To switch the use from Camera.main - use SetDebugDrawCamera(Camera camera) - method.

Member Function Documentation

void Twoorb.Utilities.DebugPainterMono.DrawBounds ( DebugBounds  debugBounds)

Adds a draw bounds object operation to the drawing queue. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugBounds to get bounds objects to use for drawing.

Parameters
debugBoundsThe DebugBounds object with drawing information
void Twoorb.Utilities.DebugPainterMono.DrawCircle ( DebugCircle  debugCircle)

Adds a draw circle object operation to the drawing queue. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugCircle to get circle objects to use for drawing.

Parameters
debugCircleThe DebugCircle object with drawing information
void Twoorb.Utilities.DebugPainterMono.DrawLine ( DebugLine  debugLine)

Adds a draw line object operation to the drawing queue. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugLine to get line objects to use for drawing.

Parameters
debugLineThe DebugLine object with drawing information
void Twoorb.Utilities.DebugPainterMono.DrawSphere ( DebugCircle  debugCircle)

Adds a draw circle object operation to the drawing queue for sphere. After it completed, it will be returned to an empty object pool. Use GetEmptyDebugCircle to get circle objects to use for drawing spheres.

Parameters
debugCircleThe DebugCircle object with drawing information for spheres
DebugBounds Twoorb.Utilities.DebugPainterMono.GetEmptyDebugBounds ( )

Gets an empty unused DebugBounds object from the pool, creates a new if none is available. Use this method instead of creating a new object yourself.

Returns
The empty unused DebugBounds Object. Use it to draw a bounds or box collider object
DebugCircle Twoorb.Utilities.DebugPainterMono.GetEmptyDebugCircle ( )

Gets an empty unused DebugCircle object from the pool, creates a new if none is available. Use this method instead of creating a new object yourself.

Returns
The empty unused DebugCircle Object. Use it to draw a sphere or a circle
DebugLine Twoorb.Utilities.DebugPainterMono.GetEmptyDebugLine ( )

Gets an empty unused DebugLine object from the pool, creates a new if none is available. Use this method instead of creating a new object yourself.

Returns
The empty unused DebugLine Object. Use it to draw a line
static DebugPainterMono Twoorb.Utilities.DebugPainterMono.GetPainter ( )
static

Gets the static DebugPainterObject. If there is none available, one will be created and attached to the camera object. Attaches to the Camera.main object by default. If you wish to use another camera, use the SetDebugDrawCamera(Camera camera) - method;

Returns
The static DebugPainterObject
static void Twoorb.Utilities.DebugPainterMono.SetDebugDrawCamera ( Camera  camera)
static

Sets the camera to attach the debug draw on when using the GetPainter() method.

Parameters
cameraThe camera object

The documentation for this class was generated from the following file: