[Bug] Widget animations only play 1 frame in the editor

The following BP function runs on PreConstruct.


The widget animation only contains 2 keyframes to translate a border position from left to right over 2 seconds. When playing the animation in the editor only 1 frame is shown instead of the entire animation. In-game the animation works OK.

  • Since I’ve never seen any widget animation working properly on the editor panel, this should be enough info and I assume it’s broken for everyone else?

bump

bump

bump

bummmp

:headstone: :ghost:

So the animation plays fine ingame. it plays OK when pressing the play button on the animation editor. It just doesn’t play all frames when its parent widget is added to another parent’s widget hierarchy where it is previewed in-editor. Is this not supported then? I’d like to have this working so that widget designers (not programmers) can preview their work anywhere inside the editor. Currently widgets respond to a change of a bool property on the editor panel which makes an animation play and it is expected to play entirely, not 1 frame.

bump

bump

Are you sure you are not getting TRUE FALSE TRUE FALSE…and that is causing the animation to freeze ( play forward, play backwards, … )

I am absolutely sure. I controlled this with a single checkbox.

I had the same problems on other methods running animations. For example I wanted to update the styles when a widget is selected / deselected in editor to show a “focused” style:

#if WITH_EDITOR
/*
void UUserWidgetNavigatable::OnSelectedByDesigner() {
    Super::OnSelectedByDesigner();
    SetStyleFocused();
}

void UUserWidgetNavigatable::OnDeselectedByDesigner() {
    Super::OnDeselectedByDesigner();
    SetStyleDefault();
}
*/
#endif // WITH_EDITOR

In which the SetStyle… are blueprint implementable and play an animation. Play forward for focus animation, play reverse to undo focus animation. Same result.
I am creating another post for more editor animation weirdness…

UMG animated brush material parameter has the wrong default value

I am clueless why the editor doesn’t do these things. Right now it takes an enormous amount of time to iron these things out.

Ruling out it is PC / project specific… Does it work for you?

You’re right, I couldnt play an animation with preconstruct. It freezes at frame 1 and stays in this state. But I remember that it was definitely possible before some UE5 updates.

I’ve submitted a bug report about this:

Case # 00596672: Widget Animations don’t play in Pre-Construct

1 Like

I am quite sure It happened in 4.26 / 4.27 already but I see I forgot to post a version here. Actually, back then the forums required to pick a version but today they don’t show that data… Funny.