Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Play() does not cause SplineController to produce expected behaviour
#6
(02-04-2026, 10:29 PM)_Aka_ Wrote: Hi,

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?
Reply


Messages In This Thread
RE: Play() does not cause SplineController to produce expected behaviour - by ConCat - 02-05-2026, 07:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,056 07-29-2025, 09:15 PM
Last Post: _Aka_
  Additional offset to Follow behaviour Ayyappa 3 1,943 04-30-2024, 01:35 PM
Last Post: _Aka_
  Support for "Fast Enter Play Mode" via "No Domain Reload" XtroTheArctic 5 3,389 11-27-2023, 12:03 PM
Last Post: _Aka_
  ScanConnections() causes heavy load in play mode, even with all Curvy objects removed bennett 6 3,795 04-10-2023, 10:18 PM
Last Post: _Aka_

Forum Jump: