C++ User Widget Animation


Version: 4.26.1
C++ only


Since I wanted everything to be written in C++ for my game, I needed
a c++ implementation of user widget animations.

It is quite simple: I wrote a UUserWidgetAnimation class which ticks
and updates transforms of widgets.
Also I wrote a UAnimatableUserWidget which has some utility functions to
create and store animations.

The construction is a bit awkward, you need to pass in a couple of nested struct
and TMap constructors but it works quite well and performant.

Warning: This relies on the Widget Render Tint engine modification found here.
You can also check out the code and change what uses SetRenderTint() but I found
when using UTextBlock::SetColorAndOpacity() it sometimes did not update,
so I implemented a RenderTint on UWidget.

Download:

CPPUserWidgetAnimation.zip

Installation:

Put the files from the .zip archive in Source/[YOURGAME] of your project.
Change includes if needed and change "YOURGAME_API" to be the API of your project.
You might also want to add "UMG" to the PublicDependencyModuleNames in the Build.cs
file of your project.