Files
Caleb Sandford deQuincey 334021d04e Started project
2025-11-14 17:30:41 +00:00

26 lines
648 B
C#

using UnityEngine;
public class EnemyPath : MonoBehaviour
{
public Transform[] waypoints;
private void OnDrawGizmos()
{
if (waypoints == null || waypoints.Length == 0)
return;
Gizmos.color = Color.red;
for (int x = 0; x < waypoints.Length; x++)
{
//if (waypoints[x] != null && waypoints[x] != null)
{
Gizmos.DrawWireSphere(waypoints[x].position, 0.5f);
if(x < waypoints.Length - 1)
{
Gizmos.DrawLine(waypoints[x].position, waypoints[x + 1].position);
}
}
}
}
}