How to make a UMG loading screen widget persist after "Open Level"?

I’m creating a simple loading screen in UMG and I add it to viewport, then I run “Open Level” after a short delay, but it always destroys the widget as soon as the new level begins to load.

How can I make it persist until I destroy it?

I have tried creating it in the GameInstance and using Streaming Levels is not an option.

Thanks

This would be great to get an answer to!

Create it within the game instance BP, which always persists!

Correct and use the GetGameViewportClient()->AddViewportWidgetContent(MyWidget->TakeWidget()); to make sure it doesn’t get cleaned up when the player controller does.

Thank you for your response!

It’s enough to create a variable in your GameInstance, even if you create the UI elsewhere, you can set that variable, so your UI will not be cleaned up during open level.