Wiki > UnityGLDebug

GLDebug class


A class used to draw lines that can bew viewed on a compiled game.

Namespace: RotaryHeart.Lib.UnityGLDebug
Assembly: UnityGLDebug (in UnityGLDebug.dll)

Syntax


public class GLDebug : MonoBehaviour

Classes


Accessibility Level Name Description
private Line Class that holds the information for a line. This is a nested class.

Properties


Accessibility Level Type Name Description
private static GLDebug m_INSTANCE Holds the reference for the system.
private static Material m_MATZON Material reference that uses depth.
private static Material m_MATZOFF Material reference that doesn't use depth.
public static GLDebug Instance This is used to make sure that there is an instance of the script running when trying to draw any line.
private List<Line> m_lines The list of lines to be drawn.
public bool displayLines Used to indicate if the lines needs to be displayed.

Methods


Accessibility Level Type Name Description
private void Awake() Called by Unity, initializes the system.
private void SetMaterial() Initialize the materials used for drawing lines.
private void OnPostRender() Called by Unity, used to draw the lines.
private static void void _DrawLine(Vector3, Vector3, Color, float, bool) Internal draw line function.
public static void void DrawLine(Vector3, Vector3, Color = null, float = 0, bool = false) Draw a line from start to end with color for a duration of time and with or without depth testing. If duration is 0 then the line is rendered 1 frame.
public static void void DrawRay(Vector3, Vector3, Color = null, float = 0, bool = false) Draw a ray from start to start + dir with color for a duration of time and with or without depth testing. If duration is 0 then the ray is rendered 1 frame.

See also