Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline prefab problem - resets spline
#1
Hi!

I'm using Unity 5.2.2f1 (Android) with Curvy 2.0.2, and I'm having a problem with a spline prefab.
If I change the shape of the spline, then hit apply on the prefab, it resets back to a square Sad

There's this error in the console:
NullReferenceException: Object reference not set to an instance of an object
FluffyUnderware.Curvy.CurvySplineSegment.get_localPosition () (at Assets/Packages/Curvy/Base/CurvySplineSegment.cs:704)
FluffyUnderware.Curvy.CurvySpline.IsPlanar (CurvyPlane plane) (at Assets/Packages/Curvy/Base/CurvySpline.cs:1988)
FluffyUnderware.CurvyEditor.CurvySplineEditor.OnEnable () (at Assets/Packages/Curvy/Base/Editor/CurvySplineEditor.cs:39)

Any ideas?

..actually that error may be unrelated.
If i drag the prefab into an empty scene, then just hit apply (without making any changes), it resets back to the square.
Reply
#2
Do you have a CurvyShape (e.g. Rect) attached to the spline component? In that case it's working as intended, because CurvyShape applies the shape when updating. If you want to apply a shape only once, disable or remove the component afterwards - that's how the editor shape wizard does it when hitting "Close" instead of "Save".
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Absolute distance along spline for Shape Extrusion Module amutp 3 205 10-31-2021, 10:26 AM
Last Post: _Aka_
Question Generating a path from selected point to the beginning of spline on a closed spline? Zendariel 5 315 10-29-2021, 01:57 PM
Last Post: _Aka_
  Controller/Spline flipping object topquarkone 4 284 10-28-2021, 05:02 PM
Last Post: _Aka_
  How to find out whether the spline is self-intersected. mydayz 1 186 10-19-2021, 12:08 PM
Last Post: _Aka_

Forum Jump: