Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
splines from .txt files
#6
(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.



 
Reply


Messages In This Thread
splines from .txt files - by Lila - 04-30-2014, 01:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 5 19 04-25-2024, 11:11 AM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  Using Unity's SplineContainer in Curvy Splines dlees9191 3 15 02-26-2024, 09:49 AM
Last Post: _Aka_

Forum Jump: