Animate a line draw using Line Renderer Component
Why Stack Overflow recommends it
Stack Overflow users link it when answering how to connect two objects with a line in Unity or animate a line being drawn over time.
Recommended by 3 people across 3 different months, 2014 to 2017.
What it is
A roughly 29-minute CG Cookie Unity tutorial showing how to draw a line from one game object to another with the Line Renderer component and animate it growing from point A to point B using a small script.
What people said
Recommends Vardan Meliksetyan · 2014-08 · Stack Overflow · on “Draw Line Connecting two Object/Vector3 Unity3d”
For scene you can use GL.Lines or Debug.DrawLine or Debug.DrawRay. But this lines you can't see in your game. So use Line Renderer. For you it can useful [this video]
Recommends Programmer · 2016-04 · Stack Overflow · on “Unity animated ribbon effect”
Tiziano is right. You can use Procedural but I think that is complicated. If you are advanced then you can do that. There is an easier way to do this like you asked. It is called LineRenderer [LINK] You need to learn Coroutine first, then animate the LineRenderer by moving the position of the LineRenderer's points in coroutine. This is the easiest way of doing this in unity. If you look at the video below at 0 : 27 , you will see what LineRenderer can do. [LINK] Learn about animating with LineRenderer [this video]
Recommends vicky · 2017-01 · Stack Overflow · on “How to make a linking line in unity”
I hope you are familiar with touch. all you have to do is use Line Renderer in unity. just go through this link Line Renderer [this video]
Cites Sanket Kachhela · 2017-02 · Stack Overflow · on “Draw line animation in libGDX”
I am doing first game in libGdx. i have to do line draw animation like this video [this video] here is my code to drawline Vector2 start = new Vector2(10, 10); Vector2 end = new Vector2(100,100); ShapeRenderer shapeRenderer=new ShapeRenderer(); shapeRenderer.setProjectionMatrix(cam.combined); shapeRenderer.begin(ShapeRenderer.ShapeType.Line); shapeRenderer.setColor(Color.BLACK); shapeRenderer.line(start, end); shapeRenderer.end(); i am able to draw direct line between 2 points but need to have with drawing animation. any help?