https://gamedev.stackexchange.com/questions/128432/how-to-draw-an-arc-between-two-angles
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode]
public class Point : MonoBehaviour {
public float startAngle,endAngle;
public int segments;
public float radius;
public List<Vector2> arcPoints = new List<Vector2>();
private void Update() {
arcPoints.Clear();
float angle = startAngle;
float arcLength = endAngle - startAngle;
for (int i = 0; i <= segments; i++)
{
float x = Mathf.Sin(Mathf.Deg2Rad * angle) * radius;
float y = Mathf.Cos(Mathf.Deg2Rad * angle) * radius;
arcPoints.Add(new Vector2(x,y));
angle += (arcLength / segments);
}
for (int j = 0; j < segments; j++)
{
Debug.DrawLine(arcPoints[j],arcPoints[j+1],Color.red);
}
}
}