Adjustable spaced, dashed line?

Hey there,
I was trying to locate a line that might replace Handles.DrawDottedLine() to be used to differentiate different types of point to point connections, but I am not seeing an option for this. Am I just missing it?

I see that the polyline uses segments, do I just have to, I suppose, make a bunch of segments and just alternate making some transparent or similar?



Dashed lines are on my todo list, but yes, currently you’ll have to do it manually I’m afraid.

I’m planning on implementing this as a scope so that you can do something like

using(Draw.WithStyle(dashed: true)) {
    Draw.Line(a, b);
    // etc...

and everything will work.

1 Like

Ah nice, that should be perfect.

1 Like

Is the dashed line supported now? do not find anything about it in the doc

DashedLine and DashedPolyline are now supported.

1 Like

Very cool, currently I’m using Vectrosity for drawing solid and dashed line in my project and I want to change it to Aline as Vectrosity has been deprecated from the Asset Store. But before that I’d like to know if you have compared to it in terms of performance. What I’m drawing is the border of some continuous hexagonal tile.


I haven’t tested vectrosity, but generally performance should be pretty good.

This implementation of dashed lines is not the most performant, as it draws all dashes as their own segments. But unless you use a ton of them, I think it should be fine.