Quantcast
Channel: Answers for "How to draw a line using script"
Browsing all 18 articles
Browse latest View live

Answer by robert

You can either use a LineRenderer (also from a script) for a line drawn on a camera-facing stripe of quads or you can use good'ol GL.Begin(GL.LINES) to have the traditional rasterization to a line of...

View Article



Answer by ericksson

There is a discussion about this here: http://forum.unity3d.com/viewtopic.php?t=34735&sid=b7db7a2f8b373969ba16f82a6af23b4aThe script discussed above is here:...

View Article

Answer by Goody!

A simple one is debug.drawline.Below from: http://unity3d.com/support/documentation/ScriptReference/Debug.DrawLine.htmlDebug.DrawLine static function DrawLine (start : Vector3, end : Vector3, color :...

View Article

Answer by Aswissrole

This has been bugging me for ages but I finally found a way. Here is my modified drawing line function which works for me. It is based off the one on the wiki and also includes some commands for...

View Article

Answer by crystalfish

Gizmos.DrawLine() , Debug.DrawLine(),GL.Begin(GL.LINES),or handls.Drawline().

View Article


Answer by 2FlyDreams

You can try "Dream Paint" ( [Asset Store Link][1] ). It allows to draw 2D and 3D primitives in game and in editor, and many others features ... [1]: https://www.assetstore.unity3d.com/#/content/13175

View Article

Answer by Aily

This works if little modified, like this: ![alt text][1] using System; using UnityEngine; public class GUILine { public static Texture2D lineTex; public static float width=1; public static void...

View Article

Answer by GluedBrain

Refer to this post on TGC [Draw line on screen][1] [1]: http://www.thegamecontriver.com/2015/05/how-to-draw-line-on-screen-in-unity-csharp.html/

View Article


Answer by paranoidray

void DrawLine(Vector3 start, Vector3 end, Color color, float duration = 0.2f) { GameObject myLine = new GameObject(); myLine.transform.position = start; myLine.AddComponent(); LineRenderer lr =...

View Article


Answer by robert

You can either use a LineRenderer (also from a script) for a line drawn on a camera-facing stripe of quads or you can use good'ol GL.Begin(GL.LINES) to have the traditional rasterization to a line of...

View Article

Answer by ericksson

There is a discussion about this here: http://forum.unity3d.com/viewtopic.php?t=34735&sid=b7db7a2f8b373969ba16f82a6af23b4aThe script discussed above is here:...

View Article

Answer by Goody!

A simple one is debug.drawline.Below from: http://unity3d.com/support/documentation/ScriptReference/Debug.DrawLine.htmlDebug.DrawLine static function DrawLine (start : Vector3, end : Vector3, color :...

View Article

Answer by PlasmaByte

This has been bugging me for ages but I finally found a way. Here is my modified drawing line function which works for me. It is based off the one on the wiki and also includes some commands for...

View Article


Answer by crystalfish

Gizmos.DrawLine() , Debug.DrawLine(),GL.Begin(GL.LINES),or handls.Drawline().

View Article

Answer by 2FlyDreams

You can try "Dream Paint" ( [Asset Store Link][1] ). It allows to draw 2D and 3D primitives in game and in editor, and many others features ... [1]: https://www.assetstore.unity3d.com/#/content/13175

View Article


Answer by Aily

This works if little modified, like this: ![alt text][1] using System; using UnityEngine; public class GUILine { public static Texture2D lineTex; public static float width=1; public static void...

View Article

Answer by GluedBrain

Refer to this post on TGC [Draw line on screen][1] [1]: http://www.thegamecontriver.com/2015/05/how-to-draw-line-on-screen-in-unity-csharp.html/

View Article


Answer by paranoidray

void DrawLine(Vector3 start, Vector3 end, Color color, float duration = 0.2f) { GameObject myLine = new GameObject(); myLine.transform.position = start; myLine.AddComponent(); LineRenderer lr =...

View Article
Browsing all 18 articles
Browse latest View live




Latest Images