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
  Curvy Line Renderer for UI Spline? gekido 1 1 9 hours ago
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 2 9 hours ago
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_
  Connections Problem Juton 3 14 03-06-2024, 10:41 AM
Last Post: _Aka_

Forum Jump: