LitMotion is a free, open source design & prototyping project written in C# and released under MIT. It has 2,337 GitHub stars, 166 forks and 51 open issues, and was last pushed 26 days ago. On this registry it ranks #66 of 100 tracked projects in Design & Prototyping, with 5 head-to-head comparisons available.

What is LitMotion?

LitMotion is an MIT-licensed, zero-allocation tween library for Unity written in C#, built on DOTS and aimed at Unity developers who need to animate transforms, materials, text, and arbitrary fields without per-frame garbage.

What it is

LitMotion is a high-performance tween library for Unity that animates components such as Transform, Material, and TextMeshPro, along with any field or property, and it works in both runtime and editor. It was designed based on the author's experience building the earlier Magic Tween library, and it uses a struct-based design with an implementation optimized using DOTS (Data-Oriented Technology Stack). The README states that in creating and updating tweens it is 2 to 20 times faster than other tween libraries, and that creating a tween allocates nothing at all.

The concrete problem it addresses is the cost of interpolating values over time in a Unity project, where a tween library handles easing, looping, delays, scheduling, and completion callbacks instead of hand-rolled per-frame update code. Within the Unity tweening ecosystem it positions itself against DOTween Pro and PrimeTween, and the README claims version 2 is as powerful, if not more, than both in terms of features. It also succeeds the author's own Magic Tween as a second-generation library in the same space.

Key capabilities

  • LMotion.Create() builds a motion in one line, and extensions such as .BindToPosition(target) bind the animated value to a target property, as in animating Vector3.zero to Vector3.one over 2 seconds.
  • Motion configuration covers easing, looping, delays, scheduling, and callbacks through .WithEase(Ease.OutQuad), .WithLoops(2, LoopType.Yoyo), .WithDelay(0.2f), .WithScheduler(MotionScheduler.FixedUpdate), .WithOnComplete(), and .WithCancelOnError().
  • Zero allocation comes from the struct-based design, and the implementation is optimized using DOTS.
  • Multiple motions combine through LSequence, and the LitMotion.Animation package creates tween animations directly from the Inspector.
  • Completion can be awaited through callbacks or coroutines, through async/await using UniTask, or converted to an Observable using UniRx or R3.
  • Zero-allocation text animation supports TextMesh Pro and UI Toolkit, and special motions include Punch and Shake.
  • Types extend through IMotionOptions and IMotionAdapter, Inspector integration uses SerializableMotionSettings, and a debugging API plus the LitMotion Debugger window are included.

Who uses it and how

  • Unity projects on Unity 2021.3 or later, with Burst 1.6.0 or later, Collections 1.5.1 or later, and Mathematics 1.0.0 or later installed.
  • Teams animating both at runtime and in the editor, using the same library in both contexts.
  • Projects already built on R3, UniRx, or UniTask, where motions integrate with existing reactive streams and async flows.
  • UI-focused work animating TextMeshPro and UI Toolkit text without per-frame allocations.
  • Performance-sensitive projects where tween creation and update cost matters, given the claimed 2 to 20 times speed advantage.

Getting started

Install through the Unity Package Manager using Add package from git URL with https://github.com/annulusgames/LitMotion.git?path=src/LitMotion/Assets/LitMotion, or add com.annulusgames.lit-motion to the dependencies block of Packages/manifest.json. Full documentation is hosted at the project homepage.

How it compares

The README names DOTween Pro and PrimeTween as the comparable feature set that version 2 matches or exceeds, and names Magic Tween as the author's prior library that LitMotion was designed after. LitMotion itself is MIT-licensed and installed directly from its GitHub repository rather than a paid product page. The comparison offered in the facts is about animation features and speed, not about licence or pricing terms for the other libraries.

When to use it — and when not to

A team adopting LitMotion takes on the dependency chain it requires, namely Burst, Collections, and Mathematics at the stated minimum versions, and it must be comfortable installing the package from a git URL or a manifest entry rather than a versioned package registry feed. It should not be chosen for projects outside Unity, or for projects pinned below Unity 2021.3. The repository carries 51 open issues, and the README excerpt documents the feature set in less detail than the linked documentation provides, so the external docs are the practical reference for adoption decisions.

project readme (upstream, from github) — read inline

LitMotion

Lightning-fast and Zero Allocation Tween Library for Unity.

license

日本語版READMEはこちら

Overview

LitMotion is a high-performance tween library for Unity. LitMotion includes a rich set of features for animating components such as Transform, Material, TextMeshPro, and any field/property, making it easy to create animations.

LitMotion is my second tween library I created after Magic Tween. LitMotion was designed based on experience implementing Magic Tween to achieve rich functionality and extremely high performance. In all situations such as creating and updating tweens, it exhibits overwhelming performance that is 2 to 20 times faster than other tween libraries. Of course, there is no allocation at all when creating a tween.

img

Additionally, v2 introduces Sequence for combining multiple motions and the LitMotion.Animation package, which allows you to create tween animations directly from the Inspector. With these additions, LitMotion is now as powerful, if not more, than DOTween Pro or PrimeTween in terms of features.

Documentation

The full version of documentation can be found here.

Features

  • Animate anything in one line of code.
  • Achieves zero allocations with the struct-based design
  • Extremely high-performance implementation optimized using DOTS (Data-Oriented Technology Stack)
  • Works in both runtime and editor
  • Supports complex settings like easing and looping
  • Waits for completion using callbacks/coroutines
  • Zero allocation text animationSupports TextMesh Pro / UI Toolkit
  • Special motions like Punch, Shake, etc.
  • Conversion to Observable using UniRx / R3
  • async/await support using UniTask
  • Type extension with IMotionOptions and IMotionAdapter
  • Integration with the Inspector via SerializableMotionSettings
  • Debugging API and LitMotion Debugger window
  • Combine animations using LSequence
  • Create complex animations directly from the Inspector with the LitMotion.Animation package

Setup

Requirements

  • Unity 2021.3 or later
  • Burst 1.6.0 or later
  • Collection 1.5.1 or later
  • Mathematics 1.0.0 or later

Installation

  1. Open Package Manager from Window > Package Manager.
  2. Click the "+" button > Add package from git URL.
  3. Enter the following URL:
https://github.com/annulusgames/LitMotion.git?path=src/LitMotion/Assets/LitMotion

Alternatively, open Packages/manifest.json and add the following to the dependencies block:

{
    "dependencies": {
        "com.annulusgames.lit-motion": "https://github.com/annulusgames/LitMotion.git?path=src/LitMotion/Assets/LitMotion"
    }
}

Getting Started

Using LitMotion allows easy animation of values such as Transform and Material. To create motion, use LMotion.Create().

Here's a sample code. Refer to the documentation for more details.

using System;
using System.Threading;
using UnityEngine;
using R3; // R3
using Cysharp.Threading.Tasks; // UniTask
using LitMotion;
using LitMotion.Extensions;

public class Example : MonoBehaviour
{
    [SerializeField] Transform target1;
    [SerializeField] Transform target2;
    [SerializeField] TMP_Text tmpText;

    void Start()
    {
        LMotion.Create(Vector3.zero, Vector3.one, 2f) // Animate values from (0f, 0f, 0f) to (1f, 1f, 1f) over 2 seconds
            .BindToPosition(target1); // Bind to target1.position

        LMotion.Create(0f, 10f, 2f) // Animate from 0f to 10f over 2 seconds
            .WithEase(Ease.OutQuad) // Specify easing function
            .WithLoops(2, LoopType.Yoyo) // Specify loop count and type
            .WithDelay(0.2f) // Set delay
            .BindToUnityLogger(); // Bind to Debug.unityLogger and display values in Console on update

        var value = 0f;
        LMotion.Create(0f, 10f, 2f) // Animate from 0f to 10f over 2 seconds
            .WithScheduler(MotionScheduler.FixedUpdate) // Specify execution timing with Scheduler
            .WithOnComplete(() => Debug.Log("Complete!")) // Set a callback
            .WithCancelOnError() // Cancel motion if an exception occurs within Bind
            .Bind(x => value = x) // Bind to any variable, field, or property
            .AddTo(gameObject); // Cancel motion when the GameObject is destroyed
        
        LMotion.String.Create128Bytes("", "<color=red>Zero</color> Allocation <i>Text</i> Tween! <b>Foooooo!!</b>", 5f)
            .WithRichText() // Enable RichText tags
            .WithScrambleChars(ScrambleMode.All) // Fill unseen parts with random characters
            .BindToText(tmpText); // Bind to TMP_Text (update text with zero allocation without generating strings)

        LMotion.Punch.Create(0f, 5f, 2f) // Create a Punch motion (regular damping oscillation)
            .WithFrequency(20) // Specify oscillation count
            .WithDampingRatio(0f) // Specify damping ratio
            .BindToPositionX(target2); // Bind to transform.position.x

        // Control created motions via the `MotionHandle` struct
        var handle = LMotion.Create(0f, 1f, 2f).RunWithoutBinding();

        if (handle.IsActive()) // Returns true if the motion is playing
        {
            handle.Cancel(); // Cancel the motion
            handle.Complete(); // Complete the motion
        }
    }
    
    // Animate TMP_Text characters
    void TMPCharMotionExample()
    {
        // Get the number of characters from TMP_Text.textInfo.characterCount
        for (int i = 0; i < text.textInfo.characterCount; i++)
        {
            LMotion.Create(Color.white, Color.red, 1f)
                .WithDelay(i * 0.1f)
                .WithEase(Ease.OutQuad)
                .BindToTMPCharColor(text, i); // Bind to the i-th character

            LMotion.Punch.Create(Vector3.zero, Vector3.up * 30f, 1f)
                .WithDelay(i * 0.1f)
                .WithEase(Ease.OutQuad)
                .BindToTMPCharPosition(text, i);
        }
    }

    // Coroutine support
    IEnumerator CoroutineExample()
    {
        var handle = LMotion.Create(0f, 1f, 2f).BindToUnityLogger();
        yield return handle.ToYieldInteraction(); // Wait for completion in a coroutine
    }

    // async/await using UniTask
    async UniTask AsyncAwaitExample(CancellationToken cancellationToken)
    {
        var handle = LMotion.Create(0f, 1f, 2f).BindToUnityLogger();
        await handle; // Await MotionHandle directly
        await handle.ToUniTask(cancellationToken); // Await with passing CancellationToken
    }

    // Convert to Observable<T> using R3
    void RxExample()
    {
        LMotion.Create(0f, 1f, 2f)
            .ToObservable() // Create motion as Observable<T>
            .Where(x => x > 0.5f) // Utilize R3 operators
            .Select(x => x.ToString())
            .Subscribe(x =>
            {
                tmpText.text = x;
            })
            .AddTo(this);
    }
}

Sequence

The Sequence feature is provided for combining multiple motions.

LSequence.Create()
    .Append(LMotion.Create(0f, 1f, 1f).BindToPositionX(transform))
    .Join(LMotion.Create(0f, 1f, 1f).BindToPositionY(transform))
    .Insert(0f, LMotion.Create(0f, 1f, 1f).BindToPositionZ(transform))
    .Run();

For more details, refer to the Sequence section in the documentation.

LitMotion.Animation

LitMotion.Animation is an additional package that provides animation functionality built with LitMotion.

By introducing this package, you can use the LitMotion Animation component to construct animations in the Inspector.

img

Requirements

  • Unity 2021.3 or later
  • LitMotion 2.0.0 or later

Installation

You can install LitMotion using the Package Manager.

  1. Open Package Manager by navigating to Window > Package Manager.
  2. Click on the "+" button and select "Add package from git URL."
  3. Enter the following URL:
https://github.com/annulusgames/LitMotion.git?path=src/LitMotion/Assets/LitMotion.Animation

Alternatively, you can open the Packages/manifest.json file and add the following line within the dependencies block:

{
    "dependencies": {
        "com.annulusgames.lit-motion.animation": "https://github.com/annulusgames/LitMotion.git?path=src/LitMotion/Assets/LitMotion.Animation"
    }
}

How to Use

For how to use LitMotion.Animation, please refer to the documentation on LitMotion.Animation.

Performance

Here are the benchmark results. The benchmark source code can be found in this repository.

Tween 64,000 float properties

Startup
Update

Tween 50,000 transform.position

Startup
Update

GC Allocation (per position tween creation)

Support

Untiy forum: https://forum.unity.com/threads/litmotion-lightning-fast-and-zero-allocation-tween-library.1530427/

License

MIT License

Frequently asked questions

Is LitMotion free to use?

LitMotion is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does LitMotion do?

Lightning-fast and Zero Allocation Tween Library for Unity.

What is LitMotion written in?

LitMotion is primarily written in C#. Its source is publicly available at https://github.com/annulusgames/LitMotion, and it has 2,337 GitHub stars.