- Home /
Drawing a '2D Line' in GUI mode. (Not in the Scene editor)
How can I draw a 2D line in Unity3D? I've been attempting to figure it out w/ GUI.Label, and GUIUtility.ScaleAroundPivot, though I'm having difficulties understanding how to use it properly. Previously I was using the GL.Begin(GL.Lines) to render the lines, and it worked fine.. only sometimes I'd find fragments of my lines scattered on the GUI, and would have to 'Refresh' each Editor GUI Component to clear the fragments.. As well as they didn't properly clip with the GUI.BeginGroup();
So, if anyone out there knows the fastest/most efficient way to do this, while keeping the Clipping of GUI.BeginGroup() in working order, I'd be most appreciated.
If you want Unity devs to implement GUI.DrawLine then please vote for my feature request ... http://feedback.unity3d.com/forums/15792-unity/suggestions/1451375-gui-drawline