C#Beta
Handles
Starting one definition returns a TweenInstance<TTarget, TValue> that controls that playback alone. The non-generic base class TweenInstance has every member but Target and Value, so handles of different types fit in one collection. Await Completion introduces handles.
Control
Section titled “Control”| Member | Type | Meaning |
|---|---|---|
Pause() |
void |
Hold playback, in addition to any pause mode |
Resume() |
void |
Release that hold |
IsPaused |
bool |
True while held by Pause(); settable |
Cancel() |
void |
Stop now and keep the latest value; does nothing once playback has ended |
Status
Section titled “Status”| Member | Type | Meaning |
|---|---|---|
State |
TweenState |
Where the timeline is; a paused handle keeps its state |
Progress |
float |
Position in the current leg, from 0 to 1, before easing. It runs backward during a ping-pong return, and isn’t the share of all cycles completed |
IsTerminal |
bool |
True once completed, cancelled, or faulted |
IsSettled |
bool |
True once the ending callbacks and cleanup have run |
CompletionReason |
Reason? |
Why playback ended; null until it has |
Error |
Exception? |
The exception that faulted playback, if one did |
Target |
TTarget |
The animated object |
Value |
TValue |
The value captured at start, then the latest value written |
Awaiting
Section titled “Awaiting”| Member | Type | Meaning |
|---|---|---|
End |
Task<Reason> |
Completes after the ending callbacks and cleanup. Any number of callers can await it, even after the end |
AwaitDecommissionAsync(token) |
Task<Reason> |
The same wait, but token cancels only this wait and throws OperationCanceledException; playback continues |
TweenState
Section titled “TweenState”| Member | Meaning |
|---|---|
TweenState.Delayed |
Waiting out the delay |
TweenState.Playing |
Moving through a leg |
TweenState.Interval |
Holding at an endpoint, between legs or cycles |
TweenState.Completed |
Reached its natural end |
TweenState.Cancelled |
Stopped early |
TweenState.Faulted |
Stopped by an exception; see Error |
Reason
Section titled “Reason”| Member | Meaning |
|---|---|
Reason.Completed |
Reached its natural end |
Reason.Cancelled |
Cancel() or CancelTweens() stopped it |
Reason.TargetFreed |
The target was queued for deletion, or found freed or disposed |
Reason.OwnerExited |
The owner left the scene tree, or a separate owner node was queued for deletion |
Reason.RunnerDisposed |
The runner, its tree, or a manual scheduler shut down |
Compare against Completed rather than a particular early reason: a node that owns its tween, as node targets do by default, reports TargetFreed after QueueFree() but OwnerExited after Free(), because Free() removes it from the tree before deleting it.
Errors
Section titled “Errors”- An exception in interpolation, easing, a setter, or a callback faults the tween.
StatebecomesFaulted,Errorholds the exception, and awaitingEndthrows it; several failures are kept in anAggregateException. - Cleanup and
OnFinallystill run, and other tweens keep playing. - The scheduler reports the exception through
UnhandledException, and the automatic runner forwards it toGD.PushError. - Invalid start arguments throw at the start call instead.
Threading
Section titled “Threading”- Create and control tweens, and await
End, on Godot’s main thread.Endcompletes there, so ordinary Godot async code keeps its synchronization context. - Don’t block with
.Wait()or.Result, and keep engine access out ofTask.RunandConfigureAwait(false). - tweens.gd has no coroutine API; use Godot’s
ToSignalfor unrelated engine signals.
tweens.gd is made with math & ferrets, copyright © 2026 its contributors.
Godot logo by Andrea Calabró, licensed under CC BY 4.0.
"Easy, the Ferret" illustrations drawn by foxy_maria.
tweens.gd is released under the MIT License.
Godot is licensed under the MIT License.
tweens.gd is not affiliated with or endorsed by the Godot Foundation.