Quitting from pause menu to main menu doesn't open main menu properly
I have just started fresh with a blank project. I have two levels, a main menu and a "world level". When I start my game it opens the MainMenu which has only 3 buttons and Title Text. When I hit Play it opens my world that shows the blank starter environment and two on-screen mobile twin stick controllers. When I open my Pause menu and try to Quit to the main menu, it leaves the sticks on screen from the world menu. I have separate pawns, characters, and game-modes for the main menu and the world, so I am not understanding what is casting the controllers on-screen in my "world" and why they don't disappear when I quit to the main menu?
asked Sep 06 '15 at 01:41 AM in Blueprint Scripting
Create a new Touch Interface that doesn't map any analog sticks, and assign that interface as the active interface when you load your main menu level.
answered Sep 07 '15 at 04:37 AM
You need to removeFromParent(self, or some other widget reference) BEFORE opening the level.
You can also do a getAllWidgetsOfClass(widget and another one for userwidget) then do a for each loop and remove them all plugging the index reference into a remove from mparent node and unchecking top level only.
Just the wrong order is all.
I also highly suggest you create a custom HUD class (right click -> blueprint classs -> all classes "HUD" since hud is the engine default the problem could be that alone.
Basically once you use the openlevel node in blueprints, nothing is accessable in memory anymore until it loads that level.
Don't forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.
Follow this question
Once you sign in you will be able to subscribe for any updates here