05-16-2014, 07:08 AM
(05-14-2014, 10:49 PM)'Lila' Wrote: My idea so far is to drop the custom editor on a prefab of a CurvySplineSegment, then drop a text file into it, click READ and automate adding a CurvySpline control point for each line.
It isn't working the way you describe it. Custom Editors are tied to Monobehaviours, so in your example you'll need to have a Monobehaviour with the name "splineReader" attached to a GameObject. Just attach your Monobehaviour to the CurvySpline GameObject and read data&set CP's from there, much like the CurvyShape classes do (Hint: examine how the legacy SplineShaper.cs (or one of the new CurvyShape subclasses) manages a spline).
Speaking about Shapes, be warned that this may cause Editor stalls, there are some bugs in there. They will be fixed in 1.61 which I'm about to submit today.