I have been trying to draw a line that looks like that. I have tried everything. Can someone tell me what type of line would do that? is it a texture or sprite or something?
Unity 5 2d

I have been trying to draw a line that looks like that. I have tried everything. Can someone tell me what type of line would do that? is it a texture or sprite or something?
Unity 5 2d

Check out: Unity - Scripting API: LineRenderer
Can the line render do rounded edges?
I have tried line renender for hours, It does not work well. I was about to buy Vectrosity and try that.

A LineRenderer won’t work for that because of the rounded ends. You need to build it in sections with the appropriate UV mapping using a mesh or UIVertices. Or, yes, just buy Vectrosity if you don’t want to fiddle around with that stuff, since it will do exactly that. ![]()
–Eric
Wait, are you the guy who wrote Vectrosity? If you say it will do it I will click buy right now!
Wait, are you the guy who wrote Vectrosity? If you say it will do it I will click buy right now!
He said it! ![]()
Indeed, I am that guy. And sluice is correct: I said it.
Quick screenshot…you can of course set color/transparency/etc. as desired:

–Eric
Bought. Going to learn it . Thank you !!!
Thank you; let me know if you have any questions. ![]()
–Eric
berry smooth ![]()
What am I doing wrong?
I imported only Vectrosity4 (using unity 5);
imported the name space with (C#)
using Vectrosity;
and i get the screen shot below.

I clicked around and found it. After unity imported it, I still had to go to Assest->Import Package-> Custom and choose the Vectrosity4 Folder.
You can just double-click on the Vectrosity4 package.
–Eric
Can you send me your texture file for the rounded corners. I am not understanding how a textfile works and need an example.
It’s from the EndCap demo, so you already have it.
–Eric
I can not get endcap.mirror to work. Can someone see what I am doing wrong.
publicclassDrawingLines : MonoBehaviour {
Vector3[ ] linePoints = newVector3[10];
Vector LinemyLine;
public MaterialmyMat;
public Texture2Dtexture;
public GameObjecta1;
public GameObjecta2;
voidStart () {
VectorLine.SetEndCap (“RoundedEnd”, EndCap.Mirror,myMat,texture);
linePoints [0] = a1.transform.position;
linePoints [1] = a2.transform.position;
myLine = newVectorLine(“myLine”, linePoints, myMat, 5.0f,LineType.Discrete);
myLine.lineWidth = 20f;
myLine.endCap = “RoundedEnd”;
myLine.Draw ();
}
I get this.

You’re only using the first two points in the Vector3 array, but you defined it to have 10 points. Since you’re only using two points, the array should have only two entries. (Also, please use code tags when posting code.)
–Eric
Is it possible to do no fill? I dont see that in the documentation? like a hollow outline?
Probably the easiest way to do that is to use a shader, though you could make the outline itself with Vectrosity (so you wouldn’t actually use textures or end caps in that case).
–Eric