Build a seekable sequence
A sequence owns its child tweens. Add children to a builder, call Run, then use the parent handle to seek or cancel the whole timeline.
| Operation | Time in the demo | Effect |
|---|---|---|
| Append | 0.00–1.00 s | Move X from 0 to 1 |
| Join | 0.00–0.60 s | Fade from 0.2 to 1 alongside the move |
| Insert | 0.75–1.50 s | Shrink from 1 to 0.4 |
| AppendInterval | 1.00–1.50 s | Wait before starting the return |
| Append | 1.50–2.50 s | Move X back to 0 |
Insert places a child at an absolute time without moving the append cursor. The inserted shrink continues playing during the interval. In the example project, Tools → MeatMotion → Sequence Preview runs this timeline in Unity. The browser timeline replays the values recorded there.
Move out and back
Add using MeatMotion; and using MeatMotion.Extensions; and put this in Start on a MonoBehaviour. The return tween suppresses its initial write so it does not snap the target to X = 5 while the sequence is being assembled.
var sequence = LSequence.Create()
.Append(MMotion.Create(0f, 5f, 1f).BindToLocalPositionX(transform))
.AppendInterval(0.5f)
.Append(MMotion.Create(5f, 0f, 1f)
.WithImmediateBind(false)
.BindToLocalPositionX(transform))
.Run();
sequence.AddTo(gameObject);
Assign a time in seconds to sequence.Time to seek. Call sequence.Cancel() to stop at the current value. MotionSequenceBuilder API · MotionHandle.Time
MeatMotion