Skip to content

tweens.gd

Define a motion once. Play it wherever you need it.

sprite.TweenPosition(to, 0.8, o => o.Ease = EaseType.BackOut);
progress 0.00weight 0.00

Animate positions, colors, UI, audio, materials, and shader uniforms with typed tween definitions. Each playback has its own handle for pausing, cancellation, and completion. Compose C# animations with async/await.

The C# implementation is available in this repository. Start with a project reference or a locally built tweens.gd package while its first public release is pending.

using Godot;
using tweens.gd;
// sprite is an in-tree Sprite2D. Run on Godot's main thread.
var movement = sprite.TweenPosition(new Vector2(400, 180), 0.6,
options => options.Ease = EaseType.CubicOut);
var reason = await movement.Completion;
if (reason == TweenCompletionReason.Completed)
GD.Print("Arrived");

Install the C# library.

Reuse definitions

Keep the endpoints, easing, and timing together. Starting a tween snapshots that definition into an independent playback. Understand definitions.

Control playback

Pause, resume, cancel, and await completion. Node ownership stops work when a scene leaves the tree. Control a C# tween.

Animate Godot properties

Use typed adapters for transforms, UI, lights, audio, particles, and more. Browse the C# catalog.

Work with materials

Animate a shared resource or a per-instance shader uniform with explicit ownership and restoration behavior. Explore material tweens.

The C# library targets .NET 10 and GodotSharp 4.7.2. The application supplies the engine; the package has no dependency on 2dog, native engine packages, or editor assemblies. See compatibility and availability before choosing an engine or export target.

The API design and easing math are inspired by Jeffrey Lanters’ unity-tweens. tweens.gd is MIT licensed, with upstream attribution preserved in the third-party notices.