DrawLine

Author: capnbishop

Description
This script allows you to draw a line between two points in the GUI system.

Usage
Render a line in the GUI system by calling DrawLine and passing it a set of Vector2's for point A and point B of the line.

Optionally, you can pass DrawLine a color and width for the line, as well as using a Rect instead of Vector2's. If you do not pass a width, the line will have a width of 1. If you do not pass a color, the line will be rendered with the GUI.contentColor.

Example 1:

C# - DrawLine.cs
''A version of the C# script suitable for editor scripts exists at http://forum.unity3d.com/threads/71979-Drawing-lines-in-the-editor. There is also an optimized version of the script later in that forum post.''