Class SplineAnimate
A component to animate an object along a spline.
Inherited Members
Namespace: UnityEngine.Splines
Assembly: solution.dll
Syntax
[AddComponentMenu("Splines/Spline Animate")]
[ExecuteInEditMode]
public class SplineAnimate : SplineComponent
Properties
Name | Description |
---|---|
Alignment | The way the object should align when animating along the Spline. See SplineAnimate.AlignmentMode for details. |
AnimationMethod | The method used to traverse the Spline. See SplineAnimate.Method for details. |
Container | The target container of the splines to follow. |
Duration | The time (in seconds) it takes to traverse the Spline once. |
Easing | Easing mode used when animating the object along the Spline. See SplineAnimate.EasingMode for details. |
ElapsedTime | Total time (in seconds) since the start of Spline's traversal. |
IsPlaying | Returns true if object is currently animating along the Spline. |
Loop | The way the Spline should be looped. See SplineAnimate.LoopMode for details. |
MaxSpeed | The maxSpeed speed (in Unity units/second) that the Spline traversal will advance in. |
NormalizedTime | Normalized time of the Spline's traversal. The integer part is the number of times the Spline has been traversed. The fractional part is the % (0-1) of progress in the current loop. |
ObjectForwardAxis | Object space axis that should be considered as the object's forward vector. |
ObjectUpAxis | Object space axis that should be considered as the object's up vector. |
PlayOnAwake | If true, transform will automatically start following the target Spline on awake. |
StartOffset | Normalized distance [0;1] offset along the spline at which the object should be placed when the animation begins. |
Methods
Name | Description |
---|---|
Pause() | Pause object's animation along the Spline. |
Play() | Begin animating object along the Spline. |
Restart(bool) | Stop the animation and place the object at the beginning of the Spline. |
Update() | Evaluates the animation along the Spline based on deltaTime. |
Events
Name | Description |
---|---|
Updated | Invoked each time object's animation along the Spline is updated. |