Unity provides standard spline asset,
use BGCurve only if Unity spline misses some feature
Change Cursor Linearly [Component]
Description
Change cursor position linearly every frame according to the speed parameter or values from custom points field.
Parameters
useFixedUpdate
Use Unity's FixedUpdate instead of Update callback to move the cursor
speedField
Custom field to get values for speed (for example speed from point 0 is active between point0 and point1 etc.). It should be a float field. Final speed is determined as speed*Time.deltaTime.
speed
Speed for moving cursor. Final speed is determined as speed*Time.deltaTime. This parameter is active only if speedField is not set.
delayField
Custom field to get values for delays (for example delay at point 0 occurs then cursor reaches point0 etc.). It should be a float field. It works correctly only if spline is not changing.
delay
Delay to occur then cursor reaches some point. This parameter is active only if delayField is not set.
overflowControl
Action, taken then cursor overflows spline's length. Cycle - cursor moves to opposite end and start moving with the same speed. PingPong - speed changes to opposite and cursor starts moving back with the same speed. Stop - speed is set to zero.
adjustByTotalLength
If spline's length changed, cursor position be adjusted with spline's length to ensure visually constant speed along the spline. You may need this if you are constantly changing the spline slightly.
pointPassed
This is a standard Unity persistent event to be fired then cursor reaches some point. It's defined as pointPassed(int pointIndex). It works correctly only if spline is not changing.