Widget not removing from viewport

I made a widget and named it MainMenu. Made 3 buttons on it: Play Continue Quit

OnClicked Play button: Load Level - Remove from parent

OnClicked Quit Button: Execute command prompt: Quit

Made a new level called: MainMenu went into the level’s BP and added: EventBeginPlay: Create Widget > Add to viewport > SetInputMode UI Only > Set Show Mouse

Now when I press play on my actual game level the main menu widget shows up and when I press play the main menu widget doesn’t go away.

none of that worked. Why is the DemoMap calling upon the MainMenu widget when that widget isn’t referenced anywhere at all in the map? It’s only referenced in the MainMenu map.

I have only initialized the Widget inside the MainMenu level BP.

I only have 2 levels: MainMenu and DemoMap

I made the widget, opened the MainMenu level BP and initialized the widget on EventBeginPlay. saved my game and hit play.

The widget would load up DemoMap when I pressed the Start button, but it wouldn’t remove the widget from the viewport. So i went to the DemoMap level and pressed “PLAY” in the editor and the widget still shows up.

When you’re moving from a menu to another or a level, make sure to add a “Remove All Widget” node. To take off the widget from displaying, for you to play the game.

and this can also be a result of uncooked maps, if so then it just reloads the current level. The nyou need to go in to your ini files and add it to always be cooked.

Do you have the main menu intialized from the level blueprint or another blueprint? If another one, then check that it isnt placed in the DemoMap, maybe you have initialied the mainmenu from the character too? Check everything out

I had the same issue about one map not loading, it was after I moved it to another folder and renamed it. After that it was hard to get it working again, so I just resaved the level with another name in the correct map and loaded that one instead.

It could be that you have initialized it in the actual game level, and not the main menu level. So that whenever you press play on the main menu it restarts the level and reopens the widget, infinitly until you quit.
If so you must find in which BP you have initialized the main menu, and stop it from opening at the start of your game level.
And for better practice then you sould use different menu widgets for different purposes

Is one of the levels orginally a copy of the other?

It is not, I went to File > New Level and then made my Widget and went from there.

And you are sure that you are not initializing it anywhere else? Really double check everything, Like in the character blueprint the animation blueprint, Anywhere you might have initialized it? Because I have a main menu actor in its own level which works without problems

Like myself, I am not using the level blurptin for the main menu, I have the main menu it its own actor that is placed in the level.

But it could be initialized anywhere. If you have something intialized trhough your Gamemode, like I said the character etc. check thos things, if hat is why it sitll initializes in the next level, change it OR make a new gamemode for the mainmenu level, And in the “options” input of the “Load Level” Node you make a sritng variable where you input
“?game=/Game/BlueprintsMyGame.MyGame_C” But you change it to reflect your projects directory