About 2D and sprite.

Hello guys.
I am making a 2D game . In this game we have to draw lines and on the lines a object will run (JUST LIKE LINE RIDER GAME) . But i have a problem i created a line using linerenderer and i want a sprite will cover the line as i extend the line the sprite also extends. But for reasons i m not succeeding. .So i need your help to do this . I will show you a pic of the problem.

By the way if there is a another way to do this plz tell me that also …

And if there is a change in the script …i will give you the link of the video …from that video i have taken the script…

THIS IS LINK TO BRACKEYS…method is same just few changes…
PLEASE HELP ME…

Look at 5:48 in the video, that’s where he creates a material and attaches it to the LineRenderer.
In order to draw textures instead of just color, you have to use some kind of shader in your created material that accepts a Texture, for instance Particles/Additive.

118374-2018-06-06-19-57-14-greenshot.png

Then drag your texture inside.
118375-2018-06-06-19-58-19-steam.png

Now you just need to attach that material to your LineRenderer.
I don’t know if Particles/Additive is the best shader for this, maybe experiment with other ones.