OpenLevel Travel Failure: Invalid URL
I'm trying to make a menu with buttons for loading levels, and I have a list of levels in my custom game mode c++ class, where I add one button for each entry. The problem is, that it won't load any levels. I assign an onlicked event to every button that loads a specific level, but I only get this output:
This is the blueprint: https://gyazo.com/b3c7e0774e934a026426ea210c69e940
If I type the level name directly into the openlevel node, it seems to work. This way it doesn't. For the buttons I had to make another custom widget containing only a button and a textblock, because I wasn't able to directly add those components.
For the openlevel node I also tried several different formats for the level file. Any ideas?
Edit: the problem seems to be something with the value that I get from the foreach loop. I see the right value when I output it inside the loop, but in the event it only prints "none".
Same problem here... 1) I deleted the Onclick event from the Graph, 2) i created a new OnClick Event 3) i connected the event with the rest of the blueprint (open level etc)
This worked for me... i think is a bug....
answered Dec 10 '15 at 08:30 AM
The solution I found for this issue is here: https://answers.unrealengine.com/questions/196214/failed-to-load-package-on-client.html
"The "Launch" button in the editor will only cook the current level that's open and save it in the Saved/StagedBuilds directory, which could explain the travel failure. One more thing to try is using the Package Project option. This will cook all the levels in your project, and should allow the server to travel to any of them."
I know this is probably irrelevant at this point, but I figured I'd post this for any others looking for the solution.
answered May 16 '16 at 12:37 AM
I just gave a solution for this in another post. But I want to share it here too :).
Go to Edit > Project Settings > Packaging. Then click on the dropdown arrow under the packaging section. List of maps to include in a packaged build. Add as many elements as you have maps you want to load. And add your maps from their directory. NOTE: If you can't find your Levels, right click them in the content browser, Show in Explorer. You may need to uncheck read only on them in the explorer. Go to : /storage/temp/190517-grlod_kct8u_ec2lkbnyqq.png
answered Jun 12 '17 at 06:36 PM
I had the same problem. Took the name from the name of the enumerator. Automatically put the node 'enum-to-name'. -> Put by hand 'enum-to-string' and 'string-to-name', and plug into "open level" function. The error has gone, the level began to load.
answered May 24 '17 at 10:18 PM
I've found away around the bug for my purposes. I was using an Enum for storing my maps and it didn't like that when trying to feed it to the OpenLevel. By converting it first to a string with the EnumToString function (don't just use the ToString function- it won't work).
answered Dec 03 '18 at 05:02 PM
make sure the name of the level is correct. that did it for me
answered Aug 12 '19 at 05:24 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here