//If we didn't hit any objects between the two vertices then we can add it as a valid path
if (Physics2D.LinecastNonAlloc(vertex, otherVertex, ray) == 0)
{
//RAINBOWS
#if true
Color[] Colors = { Color.blue, Color.magenta, Color.green, Color.yellow, Color.red };
Gizmos.color = Colors[Random.Range(0, 5)];
#endif
Gizmos.DrawLine(vertex, otherVertex);
++rayCounter;