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
Question Check Spline collisions (Pathfinding) Hukha 4 142 03-24-2020, 02:00 PM
Last Post: _Aka_
  Add Template problem in the Generator with Input Spline Shape prefab ATHellboy 1 138 03-13-2020, 11:27 PM
Last Post: _Aka_
  Spline object on a spline path ATHellboy 22 1,650 03-01-2020, 05:03 PM
Last Post: _Aka_
  Convert position of a point on a spline to another spline which is connected ATHellboy 5 453 02-17-2020, 12:17 PM
Last Post: _Aka_

Forum Jump: