Creating a dotted line in Unity

July 29, 2019

Drawing a dotted line

Download the unitypackage here
I have created a simple script that you can use to draw a dotted line in Vector2


The usage of this script is really simple. Just attach the script to an empty game object in your current scene.
DottedLine.Instance.DrawDottedLine(pointA, pointB);

You Might Also Like


  1. This is nice, but why a Singleton? That part doesn't make any sense to me.

  2. Hey, thanks for a great solution! What if I want to bend the line from between on swiping left or right? Can you please suggest me something for it? Thanks!!