Title: How to Make Sequence Start Playing Immediately in the Same Frame When Calling Play()?

Title: How to Make Sequence Start Playing Immediately in the Same Frame When Calling Play()?

Description:

Hello, I’m encountering a timing issue when playing a Sequence with camera cuts.

Current Workflow:

First, I display a UserWidget

When the UserWidget is closed, I call SequencePlayer->Play() to play a Sequence that contains camera switching

The Problem:

After the UI is hidden, the Sequence does not start playing immediately

The camera remains at its position before the Sequence starts

After investigation, I found that the Play() method actually starts playing and evaluating the Sequence on the next frame after being called

Expected Behavior: I want the Sequence to start playing and apply camera switching in the same frame when SequencePlayer->Play() is called, to avoid a one-frame camera delay.

Question: Is there a way to make the Sequence start playing and evaluating immediately in the current frame when calling Play()? Do I need to manually call Update() or use other APIs to achieve synchronous playback?

Thank you for your help!

Related Code Example:

// Current implementation

UserWidget->RemoveFromParent(); // Hide UI

SequencePlayer->Play(); // Play Sequence (takes effect next frame)

I have included a video attachment that demonstrates this bug.

重现步骤
First, I display a UserWidget

When the UserWidget is closed, I call SequencePlayer->Play() to play a Sequence that contains camera switching

Hey! Thanks for the question. This is going to be very timing dependent. In general, Slate events are going to happen at the end of the frame after the engine has ticked for that frame and sent end of world updates and the like to the render thread. It should actually already be the case that calling Play does indeed flush the sequence player’s queue and evaluate the sequence there and then, but if this logic is running in response to your UI event you might still find that there is a frame of latency because it’s just too far on in the frame.