LayerProcGen v0.1.0
Layer-based infinite procedural generation
Loading...
Searching...
No Matches
DebugDrawer

A utility for drawing lines for debug visualizations. More...

Inherits MonoBehaviour.

Static Public Member Functions

static void DrawArrow (Vector3 start, Vector3 dir, Color color, float arrowHeadLength=0.25f, float arrowHeadAngle=20, float duration=0, bool depthTest=false)
 
static void DrawCircle (Vector2 pos, float radius, int segments, Color color, float duration=0, bool depthTest=false)
 
static void DrawCircle (Vector3 pos, float radius, int segments, Color color, float duration=0, bool depthTest=false)
 
static void DrawCross (Vector2 pos, float size, Color color, float duration=0, bool depthTest=false)
 
static void DrawCross (Vector3 pos, float size, Color color, float duration=0, bool depthTest=false)
 
static void DrawCube (Matrix4x4 matrix, Color color, float duration=0, bool depthTest=false)
 
static void DrawCube (Vector3 pos, Vector3 scale, Color color, Vector3? rot=null, float duration=0, bool depthTest=false)
 
static void DrawLine (Vector3 start, Vector3 end)
 
static void DrawLine (Vector3 start, Vector3 end, Color color, float duration=0, bool depthTest=false)
 
static void DrawLineArrow (Vector3 start, Vector3 end, Color color, float arrowHeadLength=0.25f, float arrowHeadAngle=20, float duration=0, bool depthTest=false)
 
static void DrawRay (Vector3 start, Vector3 dir)
 
static void DrawRay (Vector3 start, Vector3 dir, Color color, float duration=0, bool depthTest=false)
 
static void DrawRect (float xMin, float yMin, float xMax, float yMax, Color color)
 
static void DrawRect (Vector2 min, Vector2 max, float depth, Color color)
 
static void DrawSquare (Matrix4x4 matrix, Color color, float duration=0, bool depthTest=false)
 
static void DrawSquare (Vector3 pos, Vector3 scale, Color color, Vector3? rot=null, float duration=0, bool depthTest=false)
 

Public Attributes

LayerMask debugLayers = ~0
 
bool display = true
 
Shader shaderZOff
 
Shader shaderZOn
 

Static Public Attributes

static float alpha = 1f
 
static Matrix4x4 matrix = Matrix4x4.identity
 
static bool xzMode = false
 

Detailed Description

A utility for drawing lines for debug visualizations.

Functions that take Vector3 parameters draw in 3D space. Functions that take Vector2 parameters draw in either the XY or XZ plane depending on whether the xzMode property is set to true.