WXMC/.svn/pristine/a8/a858d5a4d301697ee250338c8c9ce0cedf3e6d5d.svn-base

28 lines
608 B
Plaintext
Raw Permalink Normal View History

2024-12-04 16:18:46 +08:00
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);
}
}