10-08-2022, 07:31 AM
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
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.