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
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_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44

Forum Jump: