MeatMotion

Unity tweens you can scrub like a timeline

MeatMotion builds tweens and sequences with a LitMotion-compatible API. Set Time on one handle and every child moves to that moment, forwards or backwards.

Get started

Unity 6.3+ · v0.1.0 · MIT

MSequence2.50 s
x 0x 5
00.51.01.52.02.5
Local X
AppendIntervalAppend
0.00
Alpha
Join
0.20
Scale
Insert
1.00

One chain builds the timeline above

Each child is an ordinary tween. Append plays it after the previous one, Join plays it alongside, and Insert places it at an absolute time without moving the cursor.

CallTimeChanges
Append0.00–1.00 sLocal X 0 → 5
Join0.00–0.60 sAlpha 0.2 → 1
Insert0.75–1.50 sScale 1 → 0.4
AppendInterval1.00–1.50 sWait
Append1.50–2.50 sLocal X 5 → 0

Build a sequence

var sequence = MSequence.Create()
    .Append(MMotion.Create(0f, 5f, 1f)
        .BindToLocalPositionX(transform))
    .Join(MMotion.Create(0.2f, 1f, 0.6f)
        .BindToColorA(spriteRenderer))
    .Insert(0.75f, MMotion.Create(1f, 0.4f, 0.75f)
        .BindToLocalScaleX(transform))
    .AppendInterval(0.5f)
    .Append(MMotion.Create(5f, 0f, 1f)
        .WithImmediateBind(false)
        .BindToLocalPositionX(transform))
    .Run();

sequence.Time = 1.25;

64,000 float tweens in 1.86 ms a frame

Whole-frame time with 64,000 float properties, median of three launches. MeatMotion had the lowest median in all 31 update workloads we compared.

MeatMotion1.855
MyMotion2.099
LitMotion2.175
Unity Tweens6.813
DOTween6.943
LeanTween7.421
PrimeTween9.947
Milliseconds per frame, lower is better
Creating tweens, ms
64,000 float50,000 position
MeatMotion6.0004.617
LitMotion12.90513.821
MyMotion13.86917.386
PrimeTween25.46314.478
DOTween33.27615.857
LeanTween23.31113.142
Unity Tweens45.52331.131

Unity 6000.6.5f1, Windows x64 Mono player, Ryzen AI 9 HX 370. All workloads and conditions

Coming from LitMotion

Replace LMotion with MMotion and switch the namespaces. Extension calls such as BindToPosition keep their names. The 149 LitMotion 2.0.2 tests ported to MeatMotion pass.

Migration guide

-using LitMotion;
-using LitMotion.Extensions;
+using MeatMotion;
+using MeatMotion.Extensions;

-LMotion.Create(0f, 5f, 0.4f).BindToLocalPositionX(transform);
+MMotion.Create(0f, 5f, 0.4f).BindToLocalPositionX(transform);

Integrations

Install

In the Package Manager, choose + → Install package from git URL and paste

https://github.com/Garume/MeatMotion.git?path=src/MeatMotion/Assets/MeatMotion