How do I stop widgets meant for other levels, appearing when not intended?

I’ve followed a couple of tutorials to create a Sprint, Health Bar, Timer and Menu for my project using these videos: Sprint, Health Bar, Timer and Menu

For the Menu video, I created a new level to add my Main Menu Screen widget. The problem is that the timer, health bar and sprint bar always show up, but does disappear if I select credits and return to the main menu.



Here are the blueprints that show the widgets in the character Blueprints:Widget in character blueprint. My question is, how would you make it to where those widgets don’t show up besides the levels I want them to?

It sounds like you’re allowing your character with the UI stuff to be spawned during your main menu level. You’re either doing that manually somewhere (so just don’t do that) or you’re letting the game mode do it. In that case you need to create a new game mode, one specifically for your main menu level, associate it as the game mode for the main menu level and then make sure that the pawn that it’s configured to spawn is something benign. You can continue to use the game mode you already have in the level for your actual game that you (presumably) load into when pressing the ‘Start’ button.

2 Likes

Thank you so much, I’ve had this problem for like 2 years and just now figured it out. Just to remind myself and anyone else in the future, all I needed to do was 1) Create a new blank Game Mode Blueprint. Then 2) Under “Components” click on “[Insert Name Here] Game Mode (Self)” and in “Detail”, “Classes”, find “Default Pawn Class” and finally choose “None”. Then of course apply the Game Mode to the Level World Setting if it is the one I don’t want the widgets to show up.

You were correct. Although there wasn’t any Player Pawn in the actual level Outliner, every Game Mode by default in the Default Pawn Class, would always add one into the level without me even knowing. Again, thank you very much.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.