28 lines
608 B
Plaintext
28 lines
608 B
Plaintext
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public static class MoreGizmos
|
||
|
{
|
||
|
public static void DrawMultiLine(params Vector3[] points)
|
||
|
{
|
||
|
int count = points.Length;
|
||
|
if (count <= 1)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
Vector3 firstPoint = points[0];
|
||
|
Vector3 lastPoint = firstPoint;
|
||
|
|
||
|
for (int i = 1; i < count; i++)
|
||
|
{
|
||
|
Vector3 curPoint = points[i];
|
||
|
Gizmos.DrawLine(lastPoint, curPoint);
|
||
|
lastPoint = curPoint;
|
||
|
}
|
||
|
|
||
|
Gizmos.DrawLine(lastPoint, firstPoint);
|
||
|
}
|
||
|
}
|