Switching between levels bugs HUD

Hello My game has 2 Levels: Menu and Game, there are different widgets (menu, game, pause) everything is managed by the GAMEHUD which thanks to an ENUM switches between the different widgets, however is bugged.
-If i start from the game and i press the PAUSE button everything is fine, GAMEUI disappears and the PAUSEUI comes in.

  • If i start from the menu and then press PLAY, the GAMEUI is fine but if I press the PAUSE button, the PAUSEUI shows up but behind it there is still the GAMEUI…
    This was happening to me even in 4.5.1 but I could fix this by using the command “REMOVE ALL WIDGET OF SELECTED CLASS” (or something similar), this command is no more in the ENGINE…
    any Ideas? might be a bug

Did you remove the GAMEUI Widget from the Viewport when starting the Game through the menu or do you just change the level?

Ok, so pressing a button changes the ENUM to Pause and this should remove the GameUI. And you do this twice because of testing? Because the button has a “remove” for the gamehud and the Enum itself removes it.

You could try to debug it with some print strings to check if the removes are called properly.

here’s the blueprints

the game hud mamages what to show

and than on WIDGETS there are buttons which change the value of the enum

sry this is a button example

i uploaded the same image twice by accident lol.
If i put a “PRINT STRING” after the enum it writes theright thing…This might be a Widget BUG, since if i start from the GAME instead from the menu the UI works fine…

I Managed to fix the problems

its good that you managed to fix the problem, would you please indulge the rest of us experiencing the same issues and looking for an answer? <3