Main Menu Widget Not Closing

Hi,
I have created a main menu
I have Play button which is loading a map and then i have attached " Remove from parent "
But its not removing the widget from the viewport.

I have attached my Level Blueprint and Widget bluepring Graph Please check and help me

To me it looks like you have created a loop. So your level loads (Interior01) and loads the widget. You click the button which opens the level (Interior01) again and then the widget is destroyed. BUT the event begin play activates again when the level is loaded and a new widget is created. Try creating a new test level and activate it in the open level node and see if it disappears.

1 Like

No problem! Remember to mark it as answered so other people can see the fix

Thanks solved my issue Thank you steve

Sorry for my ineptitude. But how did you manage to fix it? I either seem to be stuck with the menu not closing or having no menu at all. I’m new to all this. alt text

In your Main Menu blueprint try putting the remove from parent before the open level?

Hey ! I am also Having the problem, while I am on a New level and such, when i Open the level from the start game button, it plays the music which i had set for the level, and also plays the game, but keeps the main menu from going away

same here dude!

Thanks !!
It have created a loop.
Destory the loop!

Alright so I found a solution.

  1. create a Dummy Level lets say “Menu_lvl”.
  2. go to project settings and search and set the Editor startup map and Game Startup map to “Menu_lvl” map/level.
  3. In the “Menu_lvl” level’s blueprint connect the following nodes like this
    Event BeginPlay → Create Widget (for class value = MainMenu) → Add to Viewport (connect the target too).
  4. then in your MainMenu widget blueprint select the correct logic of the level/map you want to open when the start button is clicked (prefer using Open Level by Object Reference as you might face some packing problems).
  5. save and compile all blueprints.
  6. done.

the problem mainly occurs because you set your level/map as default level to open when you play game, because of which the when you click start button it does not work as the level is already running and thus your main menu does not disappear from your screen.