Documentation

Unity Engine

Download Unity

Unity Engine

LINES

Mode for GL.Begin: draw lines.
Read time 1 minuteLast updated 2 days ago

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public const int LINES = 1

Remarks

Draws lines between each pair of vertices passed. If you pass four vertices, A, B, C and D, two lines are drawn: one between A and B, and one between C and D.
To set up the screen for drawing in 2D, use GL.LoadOrtho or GL.LoadPixelMatrix. To set up the screen for drawing in 3D, use GL.LoadIdentity followed by GL.MultMatrix with the desired transformation matrix.
To draw lines without immediate mode, use a mesh with MeshTopology.Lines and Graphics.RenderMesh. For an example, refer to GL.
Additional Resources: GL.Begin, GL.End.