Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Null reference when spline controller added runtime
#1
Hi there,

I have a gameobject on which I am adding a SplineController component at runtime. As soon as I assign an existing spline to the Spline property though the follow exception throws:

Code:
NullReferenceException: Object reference not set to an instance of an object
FluffyUnderware.Curvy.Controllers.CurvyController.Initialize () (at Assets/Plugins/Curvy/Controllers/CurvyController.cs:827)

Which is the line:

Code:
onInitialized.Invoke(this)

onInitialized is null


Interestingly, if I remove my added SplineController and add another one using the editor at runtime it works fine. So I guess my question is, after adding a SplineController dynamically at runtime is there something else I need to do to initialize it correctly?

many thanks

John
Reply
#2
Hi
Here is the workaround. This will be fixed in the next Curvy update
https://forum.curvyeditor.com/thread-856.html
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information Common reasons why your spline gizmo is invisble _Aka_ 0 0 05-20-2022, 03:56 PM
Last Post: _Aka_
  Connect two spline at runtime Doomchecker 2 6 05-18-2022, 04:12 PM
Last Post: Doomchecker
Question Error after upgrade: (are you missing a using directive or an assembly reference?) boriskourt 3 5 05-17-2022, 12:32 PM
Last Post: _Aka_
  Outer space simple vehicle controller itzikpel 1 7 04-29-2022, 03:05 PM
Last Post: _Aka_

Forum Jump: