How do I make a ui only appear on a specific level and an alternative ui on the other level?

Hello, I made a main menu and a menu that appears when you click escape in the game. When you click on options from the main menu and the escape menu it redirects you to the same options menu but when you go back it also redirects to either main menu or scape menu.

I want the escape menu to appear if you are in the thirdpersonmap and the main menu appear if you are in the main menu map. How can I do this?

This is my code for the backbutton and I was thinking it is maybe possible with a branch:

Make your own HUD blueprint.

Then use widget switcher:

Last part would be adding code to hud blueprint that recognizes loaded level and tells umg to switch widgets.


There are many ways… You can use a switch to create a specific widget or as Nawrot Said you can use a hud/widget switcher

You can run a level check on the character class begin play. Or setup a different game modes, one to spawn ui the other to not and assign the appropriate one in the override on the level.

How do you get the switch on string to change from: Case_0, Case_1 to the names of the specific levels and what should the print screens settings be?

I managed to find out how to do that and it works now but for some reason I get these errors:

And this is the code I made

Try having two seperate nodes for add to viewport, its likely trying to add both even tho only one execution path was followed, i should have tested that bit in the code i threw together to show you, but i was mostly trying to show off the switch statement