Widget animations queued before Slate creation are not carried out in UE5.8

We are currently upgrading some of our systems from Unreal 5.6 to Unreal 5.8, and we’ve noticed an issue with Widget animations. In one of our commonly used actors, a Widget animation is queued in the actor’s BeginPlay using QueuePlayAnimation (representing a monitor being switched on). In Unreal 5.6, once the Slate for this widget has been constructed, the animation plays out, and the actor behaves correctly. Unfortunately under Unreal 5.8 this does not happen - the queued animation is being dropped and never plays, meaning that the actor behaves incorrectly.

We have debugged this ourselves, and we believe that the root cause is changes made in UUMGSequenceTickManager::TickWidgetAnimations in Unreal 5.8. This code block is new, and when we have queued animations before initial Slate construction has completed, we get into here and return true. This causes our queued widget to be removed.

	else if (!UserWidget->IsConstructed())
	{
		if (!bIsCurrentlyEvaluating)
		{
			// Tear down any animations that are not currently being stopped.
			UserWidget->ConditionalTearDownAnimations();
			UserWidget->UpdateCanTick();

			// If there are no more animations playing, we can remove this widget altogether.
			if (!UserWidget->IsAnyAnimationPlaying())
			{
				// Resetting the animation tick manager is ok here because TearDownAnimations will always 
				// clear out all animations.
				UserWidget->AnimationTickManager = nullptr;

				// Remove this widget.
				return true;
			}
		}
	}

We could probably try to work around this by creating our own queueing system, and repeatedly testing whether the Slate construction has occurred yet, but our assumption is that the queue system on User Widget is intended to be able to handle this case, and this seems like a new bug.

I’ve provided a simple reproduction case of the bug, showing that it works as expected in Unreal 5.6, but is broken in Unreal 5.8.

[Attachment Removed]

Steps to Reproduce

  • Open SlateAnimationRepro project in Unreal 5.6.
  • Start playing in level ReproLevel
  • Fly the camera backwards and forwards, and note that as the actors are streamed in, they play an animation going from a black rectangle to a green rectangle.
  • Open SlateAnimationRepro project in Unreal 5.6.
  • Start playing in level ReproLevel
  • Fly the camera backwards and forwards, and note that as the actors are streamed in, they no longer play an animation and remain as black rectangles.
    [Attachment Removed]

Hey there,

Yeah, there is a regression here, though this code has been the same, just in a different spot, for a while (2023). The simple code fix for this is to add one more check to the bIsCurrentlyEvaluating to be:

if (!bIsCurrentlyEvaluating) 
 
becomes
 
if (!bIsCurrentlyEvaluating || !UserWidget->QueuedWidgetAnimationTransitions.IsEmpty())

But I’m going to log an issue anyway. If you need a workaround fix, the easiest path is to add a frame delay at the Begin Play of your widget.

Dustin

[Attachment Removed]

Here’s the issue if you would like to follow it:

https://issues.unrealengine.com/issue/UE-398754

[Attachment Removed]

Yeah, it’s the process of becoming visible. It will appear shortly. That said, the code above is the proposed fix.

Dustin

[Attachment Removed]

Thanks for following up! I’m not able to view that issue, has it not been made public yet?

Adding a frame delay is doing the job as a workaround, but when there’s a proper fix we’ll move to that instead - I’m always paranoid about arbitrary delay nodes.

[Attachment Removed]