Hello all, I hope you are well. I have a problem which has halted my initial onboarding to Curvy Splines and I would really appreciate some help.
I have a basic Spline with four control points, and an example game object with a Spline Controller attached. The example game object has no colliders or rigidbodies attached, and exists only as a base Unity GameObject, with some Monobehaviours (unrelated to movement) attached.
I attached a Spline Controller to the aforementioned game object, and when "Play Automatically" is ticked - it follows the spline as expected, including abiding by constraints, and emitting expected events. This is the desired behaviour.
However, if I untick "Play Automatically", and instead call "Play()" the object does not follow the spline as expected. The PlayState is updated, but the object does not move. I have also wrapped any usage in a Coroutine to test if I need to wait for the Spline to be initialized, but this has made no difference.
I have watched all of the tutorials online numerous times which set Position to 0, and the Position Mode, and have replicated this exactly. However, Play() does not begin movement.
However, this meant that Events "OnEndReached" were not triggered successfully - and that's something I would need.
Any help to get this to work as expected would be much appreciated.
For clarity, my desired behaviour is:
I would like to trigger "Play" (and subsequently "Pause") at any time via code and have the Spline Controller reach as expected.
I would rather use the Spline Controller if available as I can take advantage of its additional properties in a convenient manner (such as Clamping etc)
I need the events to fire at their expected intervals, such that I can then react to it via code
Hi, and welcome to Curvy Splines.
Your desired behavior matches what the asset is supposed to do. Can you please send me a reproduction case (scene and scripts) so I can reproduce the issue and debug it?
Thank you.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
(02-02-2026, 11:20 AM)_Aka_ Wrote: Hi, and welcome to Curvy Splines.
Your desired behavior matches what the asset is supposed to do. Can you please send me a reproduction case (scene and scripts) so I can reproduce the issue and debug it?
Thank you.
Hey Aka, thanks very much for the welcome and for reaching out so soon. Glad to hear the desired behaviour is correct and I've not mistaken the instructions.
I was able to recreate the bug with a blank project, importing only Curvy Splines. (I've removed Curvy Splines from the project files, so they'll have to be reimported.)
I also simulated the same behaviour as in my project, where an object is instantiated, and Play() is called at a time when appropriate.
Let me know if there is anything more I can do to help diagnose the issue.
I fixed the issue by modifying your CubeController so that the call to CubeMovement.BeginMovement is delayed to after the SplineController's initialization is finised. You can find a modified version of your CubeController attached to this post.
Explanation of the issue:
In your original code, BeginMovement was called directly after Instantiate(cube), before Unity automatically calls the SplineController's Start() method, which happens later that frame. BeginMovement would set the SplineControlle's state to "Playing", indirectly by calling Play(), but the initialization done in Start() would initialize the state to Stopped, which lead to the undesired behaviour.
I hope this helped.
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
I fixed the issue by modifying your CubeController so that the call to CubeMovement.BeginMovement is delayed to after the SplineController's initialization is finised. You can find a modified version of your CubeController attached to this post.
Explanation of the issue:
In your original code, BeginMovement was called directly after Instantiate(cube), before Unity automatically calls the SplineController's Start() method, which happens later that frame. BeginMovement would set the SplineControlle's state to "Playing", indirectly by calling Play(), but the initialization done in Start() would initialize the state to Stopped, which lead to the undesired behaviour.
I hope this helped.
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day.
Thanks very much, this is exactly what I needed! I really appreciate your help in finding this and for taking the time to reply, it really made a difference to the momentum of the project, so thank you again.
I was unaware that the Spline controller had it's own Initialization that I had to wait for, and so I had set WaitUntil's for the Splines Initialisation, but not the Spline Controller.
Out of interest, is there a reason that on Initialisation, it would override any values supplied before it? Doesn't it stand to reason that as part of the construction (i.e. before the call of the first frame after it's instantiated), that values could be set (such as the desired play state) before it's first call to start?
(02-05-2026, 07:37 PM)ConCat Wrote: Out of interest, is there a reason that on Initialisation, it would override any values supplied before it?
To be honest, I don't know. The asset was created by another developer before I acquired it late 2017, so I am not aware of the motivations behind many of the old design choices. Even when I find a behavior not justified or improvable, I often avoid changing it to not break users' code that relies on that behavior. I do sometimes choose to introduce breaking changes, but I need to feel that the benefits are worth it.
I do have a ticket regarding reworking the initialization process of some scripts (from memory: CurvySplineSegment, CurvySpline, CurvyController, CurvyGenerator, CGModule) to harmonize them and reduce/remove the frames needed for initialization, but it's not a high priority task.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
(02-05-2026, 07:37 PM)ConCat Wrote: Out of interest, is there a reason that on Initialisation, it would override any values supplied before it?
To be honest, I don't know. The asset was created by another developer before I acquired it late 2017, so I am not aware of the motivations behind many of the old design choices. Even when I find a behavior not justified or improvable, I often avoid changing it to not break users' code that relies on that behavior. I do sometimes choose to introduce breaking changes, but I need to feel that the benefits are worth it.
I do have a ticket regarding reworking the initialization process of some scripts (from memory: CurvySplineSegment, CurvySpline, CurvyController, CurvyGenerator, CGModule) to harmonize them and reduce/remove the frames needed for initialization, but it's not a high priority task.
Thanks very much for that insight, and I really appreciate your honesty on it too.
I appreciate the work maintaining this project might be significant, if you ever need a hand creating or updating some documentation or looking into anything minor, feel free to reach out and I'd be happy to help if I've got some capacity.
(02-08-2026, 11:39 AM)ConCat Wrote: if you ever need a hand creating or updating some documentation or looking into anything minor, feel free to reach out and I'd be happy to help if I've got some capacity.
You know what, I might at some point in the future. Can you share more with me about what you can and can't do, and about your availability requested rate. Feel free to answer either here, or by sending me an email.
Have a nice day.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.