Button OnPressed will turn my screen black and bring me back to the main menu.

Hi guys,

I’ve come across an issue I can’t find a solution for so I’m asking for your help. I created a widget which is going to be my Main Menu. I have a play button that when pressed (working on project for mobile) should take me to a new level.

Problem is that when I press on the play button the screen will go black and then take me back to the main menu. Weird thing is that within unreal everything work fine, but once it’s deployed to the phone I get this problem. Any and all help would be really appreciated.

This is my level blueprint:

This is my widget blueprint:

I have tried putting the remove all widgets and remove from parent nodes before open level and after open level as you see in the picture and both do not work. I tried to have the play buttons interaction options set to down and up and precise tap and click and both won’t work. Any advice is appreciated!

I like your idea of using node “Remove All Widgets” and “Remove from Parent”, I have integrated that into my own project.

I create a main menu widget. Then if a want to change I would create another widget and hide the current one.

Pretty cool, so you would just hide instead of deleting and recreating every time.

Your way of doing it probably means that there is no dead memory that needs to be garbage collected.

In your example you are going from a widget to another widget and that’s why you hide it right? Unfortunately for me, I’m trying to go from the widget to a level. I’ve researched and some say it’s probably because we’re launching to the phone to test and supposedly if we package it and drop it into itunes it should work, but I’m not so sure.

If it douse not work in Unreal then It will probably not work on a phone. I would recommend using the remove all widgets node, then add the widget you want the player to see in game by using the create widget then the widget you want to create, the creating of this widget should be done in the level blueprint you want to load the level to. Also I would like you to see some of the questions I have posted so you can answer them.

Hello,

are you sure the levels name typed in open level node is correct?

it works for me and no need to remove widgets as they get destroyed when opening new level.

I am unshore, how do you know that changing a level is going to remove all the widgets, you are probably correct.

i have tested it on my samsung mega 5.8 (my sister’s) . i had completed game but did not published due to shadow errors i have gone through changing levels and level save game ,umg ,textures (you need textures with power of 2 size) ,casting ,long back (1 month ago) even on windows packaged game it removed my widgets while changing levels my engine is ue4.10.4