(Low-level Engine question) Does anyone know how to add a fullscreen widget to the viewport and can be shown or hidden at any point (even between loads)?

I have been trying to make a loading screen for a game I am working on in Unreal 5.2.1.

I started by using the DefaultGameMoviePlayer like so many have suggested, but after hours of trying to configuring the correct settings (Non-dismissible until it gets a call from our game that it is ready), the movie player kept crashing I pressed the mouse button when loading. The widget still kept going, the movie player recovered, but the mouse pointer pops out when it happens. And the widget itself does not handle any input events. As I have no control over the DefaultGameMoviePlayer code I started to try to make our own loading screen setup for the game.

So my solution was to:

First override the RemoveFromParent function in the loading widget to ensure it doesn’t get removed between levels by the GameViewportSubsystem.

Then I created an instance of the loading widget in our GameInstance class and adding it to the viewport.

Next I create a thread that ticks from the RenderThread and calls the loading widget. This is working so that will not be a problem. Anyway the throbbers always seem to work anyway.

So the problem:

When I load a level, the widget and all UI’s (including our beloved PrintStrings in the top left corner) are hidden for a few seconds then get shown again. I know its the same loading widget because I am showing a counter increased by ticks.

Now I’d really want to skip recreating the DefaultGameMoviePlayer way of CreateGameWindow, unless this is the only way.

So the question:

Does anyone know how to add a widget that is always in the viewport, doesn’t interfere with the Engine, and can be shown and hidden at anytime, even between level loads?

Any other suggestions are welcome too. :smiley:

… Þröstur

It is just a guess, but I would try to look at AHUD class. So maybe if you make a BP_HUD that inherits from AHUD and manage your widgets through it you would be able to show them at anytime.