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
  Is there a way to get the position of each ControlPoint in spline by API? Chanon 1 141 06-07-2025, 09:44 AM
Last Post: _Aka_
  Filling a closed spline dynamically rickgplus 1 365 04-16-2025, 08:56 AM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 358 02-03-2025, 09:34 AM
Last Post: _Aka_
  Duplicate Prefab along path rickgplus 1 400 01-23-2025, 10:09 AM
Last Post: _Aka_

Forum Jump: