Unity Tween Engine
A zero-GC tween engine for Unity with a clean fluent API, PlayerLoop runtime, auto-play by default, and full source code included.
What's included
Gameplay, UI, camera, audio, materials, text, paths, Rigidbody, ScrollRect, and designer-authored sequences. One package. One price.
Tween state is stored in a flat pre-allocated struct array, so runtime updates avoid heap churn and GC spikes.
NexTween runs from Unity's PlayerLoop. No hidden runner prefab, no required bootstrap scene, no MonoBehaviour dependency.
Every tween fires immediately when built. Chain Ease, Delay, and OnComplete freely — call .AutoPlay(false) when you need manual control.
No black-box DLL. Debug it, extend it, and keep control when a project has unusual runtime requirements.
API reference
Every method returns a builder that auto-plays immediately. Chain what you need, store a handle when you need control, or just let it fire.
// Auto-plays immediately — no .Play() needed transform.TweenPosition(Vector3 target, float duration); transform.TweenPositionX(float x, float duration); transform.TweenPositionY(float y, float duration); transform.TweenPositionZ(float z, float duration); // Local position transform.TweenLocalPosition(Vector3 target, float duration); transform.TweenLocalPositionX(float x, float duration); transform.TweenLocalPositionY(float y, float duration); // Rotation — all overloads use Quaternion.Slerp internally (shortest path) transform.TweenRotation(Vector3 eulerAngles, float duration); transform.TweenRotation(Quaternion target, float duration); transform.TweenLocalRotation(Vector3 eulerAngles, float duration); transform.TweenLocalRotation(Quaternion target, float duration); // Scale transform.TweenScale(float uniform, float duration); transform.TweenScale(Vector3 target, float duration); transform.PunchScale(float amount, float duration); // Jump arc transform.TweenJump(destination, jumpPower: 2f, jumpCount: 1, duration: 0.8f); // Builder options — chain any combination .Ease(EasingType.OutBack) .Ease(AnimationCurve curve) .Ease("ProfileName") .Delay(0.1f) .Loop(-1, pingPong: true) .UnscaledTime() .From(Vector3.zero) .OnComplete(() => DoSomething()) .OnUpdate(t => { }) .OnKill(() => Cleanup()) .AutoPlay(false); // defer start — call .Play() manually
// Graphic (Image, Text, etc.) graphic.TweenColor(Color target, float duration); graphic.TweenAlpha(float target, float duration); graphic.FadeIn(float duration); graphic.FadeOut(float duration); // CanvasGroup canvasGroup.TweenAlpha(float target, float duration); canvasGroup.FadeIn(float duration); canvasGroup.FadeOut(float duration); // RectTransform rectTransform.TweenAnchoredPosition(Vector2 target, float duration); rectTransform.TweenAnchoredPositionX(float x, float duration); rectTransform.TweenAnchoredPositionY(float y, float duration); // Generic float — for any property with no dedicated extension FloatTo(from, to, duration, v => myObj.myValue = v).Ease(EasingType.OutQuad); // Slide-in panel example panel.anchoredPosition = new Vector2(-600f, 0f); panel.TweenAnchoredPositionX(0f, 0.5f) .Ease(EasingType.OutCubic).Delay(0.2f);
// Position transform.ShakePosition(strength: 0.3f, duration: 0.5f, vibrato: 12); transform.ShakeLocalPosition(strength: 0.3f, duration: 0.5f); // Rotation transform.ShakeRotation(strength: 15f, duration: 0.5f); // Scale transform.ShakeScale(strength: 0.2f, duration: 0.4f); // Directional punch — springs back via Quaternion.Slerp shortest path transform.PunchPosition(Vector3.up * 0.5f, duration: 0.4f); transform.PunchRotation(new Vector3(0, 0, 15f), duration: 0.4f); transform.PunchScale(1.3f, duration: 0.4f); // All shakes decay automatically — no manual reset needed // Null-safe: destroyed objects are silently skipped
audioSource.TweenVolume(float target, float duration); audioSource.TweenPitch(float target, float duration); audioSource.FadeIn(float duration); // sets volume=0, Play(), tweens to 1 audioSource.FadeOut(float duration); // tweens to 0, Stop() on complete audioSource.WindDown(float duration); // pitch to 0, then Stop() // Music crossfade outroTrack.FadeOut(1.5f).OnComplete(() => { introTrack.FadeIn(1.5f); });
// Float properties material.TweenFloat("_Cutoff", to: 1f, duration: 2f); material.TweenDissolve(1f, 2f); // shorthand for _Cutoff // Color properties material.TweenColor("_Color", Color.red, 0.3f); material.TweenEmission(Color.cyan * 3f, 0.5f); // Vector / tiling material.TweenVector("_MainTex_ST", fromV4, toV4, 1f); material.TweenTilingOffset(toTiling, toOffset, 1f); // On Renderer (auto-creates material instance) renderer.TweenDissolve(1f, 2f).Ease(EasingType.InCubic); renderer.TweenEmission(Color.red * 2f, 0.3f);
// TextMeshPro support: NEXTWEEN_TMP define added automatically by editor script text.TweenFontSize(48f, 0.3f); text.TweenColor(Color.yellow, 0.2f); text.TweenAlpha(0f, 0.5f); text.FadeIn(0.4f); text.FadeOut(0.4f); text.TweenCharacterSpacing(10f, 0.3f); text.TweenLineSpacing(2f, 0.2f); // Typewriter effect text.text = "Hello, world!"; text.TypewriterEffect(duration: 1.5f); text.TypewriterEffect(duration: 2f, showCursor: true, cursor: '_'); // Animated number counter scoreText.CountTo(from: 0f, to: 9999f, duration: 2f, format: "N0");
// Catmull-Rom spline through waypoints transform.TweenPath(waypoints, 3f).Ease(EasingType.InOutCubic); // Rotate to face direction of travel transform.TweenPathLookAhead(waypoints, 3f); // Use Transform array (positions sampled at play time) transform.TweenPath(waypointTransforms, 4f); // Move through intermediate points to a destination transform.TweenThrough(viaPoints, destination, 2f); // Local-space path (relative to parent) transform.TweenLocalPath(localWaypoints, 2f); // Preview in Scene view void OnDrawGizmos() => PathExtensions.DrawPathGizmo(waypoints, Color.yellow);
// Uses MovePosition / MoveRotation — physics broadphase stays in sync rigidbody.TweenPosition(Vector3 target, float duration); // Both euler and quaternion overloads — Quaternion.Slerp shortest path rigidbody.TweenRotation(Vector3 eulerAngles, float duration); rigidbody.TweenRotation(Quaternion target, float duration); // Kinematic movement example _body.linearVelocity = Vector3.zero; _body.TweenPosition(playerPoint.position, duration).Ease(EasingType.Linear); _body.TweenRotation(playerPoint.rotation, duration).Ease(EasingType.Linear);
// Smooth programmatic scrolling scrollRect.TweenVerticalNormalizedPos(float to, float duration); scrollRect.TweenHorizontalNormalizedPos(float to, float duration); scrollRect.TweenNormalizedPos(Vector2 to, float duration); // both axes // Scroll to top example scrollRect.velocity = Vector2.zero; scrollRect.TweenVerticalNormalizedPos(1f, 0.4f).Ease(EasingType.OutCubic); // Scroll to a specific element scrollRect.ScrollToCenter(targetRectTransform, immediate: false, time: 0.5f);
NexSequence.Create() .Append(transform.TweenPosition(pointA, 0.4f).Ease(EasingType.OutCubic).AutoPlay(false)) .AppendInterval(0.2f) .Append(transform.TweenScale(1.2f, 0.2f).Ease(EasingType.OutBack).AutoPlay(false)) .AppendCallback(() => sfx.Play()) .Append(canvasGroup.FadeOut(0.3f).AutoPlay(false)) .OnComplete(() => Debug.Log("done")) .Loop(3, pingPong: true) .Play(); // Or author entirely in the Inspector: // Component > NexTween > Sequence Component
// UniTask — auto-detected via NEXTWEEN_UNITASK define (set by editor script) await transform.TweenPosition(target, 0.5f).Ease(EasingType.OutBack).ToUniTask(); await sequence.ToUniTask(); // Coroutine yield return transform.TweenScale(1.2f, 0.3f).ToCoroutine(); yield return tween.ToCoroutine(); // Task await tween.ToTask(); // Store a handle and await it Tween t = transform.TweenPosition(target, 1f); await t.ToUniTask(); // Works on sequences too NexSequence seq = NexSequence.Create() .Append(transform.TweenPosition(a, 0.3f).AutoPlay(false)) .AppendInterval(0.1f) .Play(); await seq.ToUniTask();
// Cancellable Invoke() replacement Tween t = TweenRunner.DelayedCall(2f, () => SpawnEnemy()); t.Kill(); // cancel before it fires // Repeating callback Tween tick = TweenRunner.RepeatingCall(1f, UpdateHUD, loops: -1); tick.Kill(); // Tween handle control Tween t = transform.TweenScale(1.5f, 0.3f); t.Pause(); t.Play(); t.Kill(); t.Complete(); // jump to end, fire OnComplete t.Seek(0.5f); // jump to halfway // Kill by target TweenRunner.KillAll(transform); TweenRunner.KillAll(); // Named ease profiles transform.TweenPosition(target, 0.4f).Ease("SnappyUI");
// ── Dash ────────────────────────────────────────────────────── cc.TweenDash(direction, distance: 5f, duration: 0.18f).Ease(EasingType.OutQuart); cc.TweenDashFacing(direction, distance: 5f, duration: 0.18f); // also rotates // ── Jump ────────────────────────────────────────────────────── cc.TweenJump(height: 3f, duration: 0.6f); // parabola default cc.TweenJump(height: 3f, duration: 0.6f, curve: myCurve); // designer curve cc.TweenJumpTo(targetPosition, height: 3f, duration: 0.6f); // lands on point // ── Knockback ───────────────────────────────────────────────── cc.TweenKnockback(direction, force: 5f, duration: 0.35f, upwardPop: 1f); // ── Blink / teleport ────────────────────────────────────────── cc.TweenBlink(destination, preDelay: 0f); // ── Ledge snap ──────────────────────────────────────────────── cc.TweenLedgeSnap(snapPosition, duration: 0.18f); // disables CC during snap // ── Wall run ────────────────────────────────────────────────── cc.TweenWallRunTilt(cameraTransform, tiltAngle: 12f, rightWall: true); cc.TweenWallRunUntilt(cameraTransform); // ── Squash-stretch (on visual mesh child) ───────────────────── cc.PlayLandSquash(meshTransform, squashAmount: 0.65f, stretchAmount: 1.15f); cc.PlayJumpStretch(meshTransform, stretchAmount: 1.25f); // ── FOV kick on dash ────────────────────────────────────────── cc.PlayDashFOVKick(camera, kickAmount: 12f, duration: 0.3f); // ── Coyote time + input buffering ──────────────────────────── Tween coyote = cc.StartCoyoteTimer(0.12f, () => _canJump = false); coyote.Kill(); // consume on jump Tween buffer = cc.StartInputBuffer(0.1f, () => _bufferedJump = false); buffer.Kill(); // consume on land
// Cinemachine 3.x — NEXTWEEN_CINEMACHINE define added automatically by editor script cam.TweenFOV(40f, 0.8f).Ease(EasingType.OutCubic); cam.TweenOrthoSize(5f, 0.5f); cam.TweenDutch(12f, 0.3f); cam.PunchDutch(8f, 0.6f); cam.ShakeFOV(strength: 5f, duration: 0.5f); cam.TweenDollyPosition(0.75f, 2f); cam.TweenLens(targetLensSettings, 1f).Ease(EasingType.OutQuad); // Works in sequences NexSequence.Create() .Append(cam.TweenFOV(40f, 0.8f).Ease(EasingType.OutCubic).AutoPlay(false)) .AppendInterval(2f) .Append(cam.TweenFOV(60f, 0.5f).Ease(EasingType.InQuad).AutoPlay(false)) .Play();
How it stacks up
A focused comparison against common Unity tweening workflows.
| Feature | NexTween $12 | DOTween Pro $15 | DOTween Free | PrimeTween Free |
|---|---|---|---|---|
| Auto-plays on construction | ✓ | ✓ | ✓ | ✗ |
| Zero allocation runtime | ✓ | ✓ | ✓ | ✓ |
| PlayerLoop driven (no scene object) | ✓ | ✗ | ✗ | ✓ |
| Rigidbody extensions | ✓ | Limited | Limited | ✗ |
| ScrollRect extensions | ✓ | ✓ | Limited | ✗ |
| Material / shader property tweens | ✓ | ✓ | Limited | Limited |
| TextMeshPro extensions | ✓ | ✓ | ✗ | ✗ |
| Typewriter effect | ✓ | ✗ | ✗ | ✗ |
| Audio tweens | ✓ | ✓ | Limited | ✗ |
| Path movement (Catmull-Rom) | ✓ | Pro only | ✗ | ✗ |
| Cinemachine 3 extensions | ✓ | ✗ | ✗ | ✗ |
| CharacterController extensions | ✓ | ✗ | ✗ | ✗ |
| Inspector authoring (no code) | ✓ | Pro only | ✗ | ✗ |
| Named ease profiles (ScriptableObject) | ✓ | ✗ | ✗ | ✗ |
| Auto-detect optional packages | ✓ | ✗ | ✗ | ✗ |
| Live debugger window | ✓ | Basic | ✗ | ✗ |
Comparison is intended as a quick buying guide, not a legal feature matrix. Verify current versions and pricing before publishing final marketing claims.
Trust & workflow
NexTween is positioned for developers who care about performance, readable code, and predictable behaviour across gameplay and UI.
Use the sample scenes to test transform, UI, path, sequence, Rigidbody, ScrollRect, CharacterController, TextMeshPro, and Cinemachine workflows before adding NexTween to your own scenes.
Inspector components and ScriptableObject ease profiles let designers author animation without needing every interaction hard-coded.
Optional integrations (TMP, Cinemachine, UniTask) are auto-detected by an editor script that manages scripting defines. No manual setup needed.
One-time purchase, no Pro tier, no feature add-ons, and full source code included so teams can debug and extend it.
Pricing
Replace this with the live Asset Store product link once the package is approved.