12 private struct PointSet
14 public PointSet(
float spread) {
15 Point1 = Vector3.right * spread * 0.5f;
16 Point2 = Vector3.right * spread * 0.25f;
17 Point3 = Vector3.left * spread * 0.25f;
18 Point4 = Vector3.left * spread * 0.5f;
21 public Vector3 Point1;
22 public Vector3 Point2;
23 public Vector3 Point3;
24 public Vector3 Point4;
27 [Header(
"Bezier Settings")]
29 private PointSet points =
new PointSet(0.5f);
31 public override int NumPoints {
59 points.Point1 = point;
63 points.Point2 = point;
67 points.Point3 = point;
71 points.Point4 = point;
87 Vector3 last = GetUnclampedPoint(0f);
88 for (
int i = 1; i < 10; i++) {
89 Vector3 current = GetUnclampedPoint((
float)i / 10);
90 distance += Vector3.Distance(last, current);
102 public class CustomEditor : LineBaseEditor
104 protected override void DrawCustomSceneGUI() {
105 base.DrawCustomSceneGUI();