A UMG C++ Tweening Library

Animate UMG widgets from C++

UMG has support for animation timelines through the editor, but I often find them lacking. I created a UI tweening library in C++ to solve some of the problems of UMG animations:

  • It's easy to create create multiple, offset animations for variable numbers of widgets inside containers. For example tweening each child of a VerticalBox with a delay between each element.
  • It's possible to rearrange widget hierachies without breaking animations.
  • It's easy to scale animation durations, or have them driven by code.
UUITween::Create( SomeWidget, 0.2f )
	.FromTranslation( FVector2D( -100, 0 ) )
	.FromOpacity( 0.2f )
	.ToTranslation( FVector2D( 20, 10 ) )
	.ToOpacity( 1.0f )
	.Begin();

Download on GitHub

Tweening elements within a vertical box with a delay between each element
const float DelayBetweenElements = 0.1f;
for (int32 i = 0; i < MyVerticalBox.GetChildrenCount(); ++i)
{
	UUITween::Create( MyVerticalBox.GetChildAt( i ), 0.2f, DelayBetweenElements * i )
		.FromTranslation( FVector2D( -100, 0 ) )
		.FromOpacity( 0.2f )
		.ToReset()
		.Begin();
}