Draw a line in Game View?

As I know to draw a line in Scene View is easy to use Debug.DrawLine() function,

But I want to draw lines in Game View,How to do that?

Try this tutorial:

Please check the search of this Qota, before posting a question.

You can find your answer easily in the first 3 results: http://answers.unity3d.com/search.html?redirect=search%2Fsearch&q=draw+line

http://answers.unity3d.com/questions/17863/line-render-draw-line.html

http://answers.unity3d.com/questions/8338/how-to-draw-a-line-using-script.html

So, use a line renderer, use `GL`-class. Or use something from the forum. I have seen a couple of techniques and packages that handle it for you, but mostly not in the free version if you are looking for 1px wide lines.

This solution uses OnGUI to draw a line of variable width:

DrawLine

You can try “Dream Paint” ( Asset Store Link ). It allows to draw 2D and 3D primitives in game and in editor, and many others features …

Refer to this post on TGC
Draw line on screen