Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when switching splines
#2
Hi
From looking at the code, I think the issue comes Unity not calling the Start method on objects right after the Instantiate call, but at the frame's end or next frame's start. With Start not being called, the spline's internal data is not setup yet, leading to the exception being thrown. Try the following:
Just after the Instantiate call, please call pathInstance.Start(). Did this fix the issue?
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


Messages In This Thread
Error when switching splines - by ricke - 10-08-2022, 12:34 AM
RE: Error when switching splines - by _Aka_ - 10-08-2022, 07:31 AM
RE: Error when switching splines - by ricke - 10-08-2022, 12:15 PM
RE: Error when switching splines - by _Aka_ - 10-10-2022, 08:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 5 18 04-25-2024, 11:11 AM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
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_
  Using Unity's SplineContainer in Curvy Splines dlees9191 3 15 02-26-2024, 09:49 AM
Last Post: _Aka_

Forum Jump: