Is there a way to draw lines in Unity efficiently?

Is there a way to draw lines in Unity efficiently?

If I use MeshTopology.Lines, there will be a lot of duplicate vertices. Because I need to draw curves actually. For example, If I have 10 points in each curve, I will add perhaps 2 times vertices than using Line_Strip. Does it influence the performance? I think it’s still not efficient.

How to create a line using two Vector3 points in Unity?

Will get you there. Something that I’ve been using quite a bit lately however is to offset the gizmo matrix instead, and then render everything in a unit-space. Both are fun, but the second instance can help you later on when you start trying to represent content that is rotated or needs to be otherwise offset.

Can you draw a mesh in Unity3D pro?

It seems to be the only option if you don’t have Unity3D Pro though. The Graphics class allows to draw a mesh directly without the overhead of creating game objects and components to hold it. It runs much faster than Line Renderer, but you need to create the lines yourself.

How is the width of a line controlled in Unity?

The overall width of the line is controlled by the width value. Define a gradient to control the color of the line along its length. Unity samples colors from the Color gradient at each vertex. Between each vertex, Unity applies linear interpolation to colors.

How to draw lines on canvas in real / game time?

Mouse up, set the line and instantiate a boarded text box to the left/right of the line depending on the lines direction. the at the origin of the line, instantiate an arrow head point in the direction of the line. From all the unity help articles I’m viewing, about drawing in real time, I am not seeing anything trying to do what I need to do.

How many triangles can you draw in Unity?

As we all know, we can set a lot of triangles no more than 65536 faces in one mesh. Now, I want to draw a lot of lines (more than 10000).