02-20-2020, 01:00 AM
About crossSpline's length being 0, the cause was that circle.Refresh(); needed to be called before. Here is the block of code after my modifications
The exported mesh is still null though. I am still investigating
Code:
// Create the circle cross section
CurvySpline crossSpline = CurvySpline.Create();
CSCircle circle = crossSpline.gameObject.AddComponent(typeof(CSCircle)) as CSCircle;
circle.Radius = 1.005f;
circle.Count = 10;
circle.Refresh();
crossSpline.Refresh();
Debug.Log(crossSpline.Length);
crossSpline.MaxPointsPerUnit = 10 / crossSpline.Length;
crossSpline.Refresh();
Debug.Log(crossSpline.MaxPointsPerUnit);
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.