Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NextSpline
#1
Hello -- I've updated from v. 6.0.1 to 7.0.0 and some functionality no longer seems to work for my spline controller. I have a script calling Spline.NextSpline to find the follow up spline, which worked in the previous version but I don't see anywhere in the current documentation. Has this been changed, or could you recommend what to use instead?
Chip
Deko Games
dekogames.com
Reply
#2
Hi,

In an effort to simplify the API, that method got deprecated in version 6.4.0 and removed in version 7.0.0
Here is it's content. It's all public code, so you can just copy the code and use it wherever you want:

public CurvySpline NextSpline
{
get
{
CurvySplineSegment cp = LastVisibleControlPoint;
return (cp && cp.FollowUp) ? cp.FollowUp.Spline : null;
}
}

Even simpler, if you are sure that LastVisibleControlPoint is not null and LastVisibleControlPoint.FollowUp is not null neither, you can simply replace the implementation with this line: LastVisibleControlPoint.FollowUp.Spline

Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Thank you! I also discovered that code by looking at the previous version and wrote a substitute method.
Chip
Deko Games
dekogames.com
Reply


Forum Jump: