04-09-2019, 11:02 AM
Code:
ghostSpline.transform.GetChild(ghostSpline.transform.childCount - 2).GetComponent<CurvySplineSegment>()
Code:
ghostSpline[ghostSpline.Count - 1]
Code:
ghostSpline.Segments[ghostSpline.Count - 1]
And to avoid you confusion, when you say:
"One thing I realized is that the length needs to be grabbed from the previous spline because it's the length going forward (thus the last spline has a length of 0)."
What you speak about are not splines, but control points:
A spline has (except special cases) N control points, and N-1 segments. Each segment is the spline's chunk between two control points. Spline.ControlPointsList gives you the list of control points, and Spline.Segments gives you the list of segments. Both of them are instances of CurvySplineSegment classes
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.