OPEN LEVEL is not working

Hello people, hope you can help me, i’m having some problems trying to open the level using the node “open level”, i do everything in the “scripting the main menu” (step 4) tutorial, also used Virtus guide on youtube “Adding Main Menu Functionality - #53 Unreal Engine 4 Beginner Tutorial Series - YouTube” but still cant make it works, when i press the start button…nothing haapens, i’m sure its a simple solution but can’t find how make it works i really appreciate any guide, thanks!.

Did you save the level file? It could be that the level isn’t physically there yet because it’s not saved. If it shows an asterisks on the icon, it means you need to save it, which you can rightclick on and save.

Make sure the level name is exactly identical to your map.

Also, one thing to note is that when you change levels, using the open level node, everything is destroyed except for the game instance. The “remove from parent” node will not be executed and isn’t necessary.

Hey, thanks for the reply, yes the level is saved, the name is exactly the same, well, according to Virtus tutorial, the “remove from parent” node is for hide the menu, so, the player can play the game in the current map, i double check all this and still not working, could be anything else i’m doing wrong?

It could be a directory issue then. Try making a new map in the same directory as your menu level(if that’s what you’re using) and see if you can make it work with that.

And again, the second that open level node gets executed, the main engine thread will lock while it loads the level, open the level when complete and your MainMenuWidget goes bye-bye because widgets are not persistent through level changes. If you wanted to get fancy, you’d: OnClicked==>Show load screen image==>OpenLevel.

That way you’d have something interesting to look at while the main thread is hitched with loading.

Hey. It’s been a long time and I’m not sure if you have already got your problem sorted out. But I happened to run into this problem today as well. After some searching and trial and error, I figured out the solution as well as the reasoning behind it.

In my case, the problem happened because everything was set up in a way that got trapped in a loop. Let me explain with the help of a diagram.

I have a Level_A, which has a Game Mode_A and Level BP_A associated with it. I wrote the code to generate the UI in Game Mode_A. You might put them in Level BP_A. Regardless, they have the same effect.

Now when I click Play in the Unreal Editor, an instance of Level_A got loaded into the game, which I will call Level_A_1. This Level_A_1 calls both Game Mode_A and Level BP_A and as a result, an instance of UI_A is generated. Let’s call it UI_A_1.

To this point, I see a UI showing up in my screen, which is UI_A_1, but in fact behind the UI, Level_A_1 is already running there. If you have some sound effect in the level you should be able to hear it as a piece of evidence.

I haven’t clicked the Play Button on the UI so far. When I click it, new things happen. The click triggers the loading of another instance of Level_A, which I’ll name it Level_A_2.

When this Level_A_2 is loaded, it again runs Game Mode_A and Level BP_A. Here comes the culprit. Another instance of UI, UI_A_2 is generated by them. After that, Remove from Parent is executed. But pay attention, it just removes UI_A_1 from the viewport because this Remove from Parent command is trigger by the Play Button from UI_A_1.

UI_A_2 is still there, which makes you think nothing happens but it is actually not the same UI instance. Until you click Play Button on it again. Now UI_A_2 got cleared But here comes UI_A_3.

So it is kind of trapped in a loop. To get out of it, you have to put the code that generated the UI in a LevelBP or Gamemode associated with a level different from the level that got loaded when you click the Play Button on your UI.

Had the same issue. with Oculus Quest. From the lobby level, I had face button 1 input hooked to open Level node, but when testing, it wasn’t able to open the target level, only restarted the lobby level. After that, I moved all the levels to the Content root folder, and it started working again.

Just an update, additional to moving all the levels to the root folder, I also cooked all the maps into the build. Follow this page for the steps.

Hi guys i was facing the same issue in ue5.1 , i build my project for android and windows and error occurs in both ,

solution:-
i deactivate a plugin name "glTF importer beta " and my problem solved
try it

2 Likes

happen the same, thx for answear