Map Name Parameter for ServerTravel

So I’m using

bUseSeamlessTravel = true;
GetWorld()->ServerTravel(FString("/Game/Levels/Nordic_1"));

Apparently you need to supply the whole path to the level, otherwise it fails saying “short package names are not supported”.

However I found that when the game is packaged, my code does not work. What Parameter do I have to provide for it to work on the packaged game as well as in the editor?

I tried it with blueprints, but it seems like there is a similar issue.

Have you put your maps in a different location than the default (because the path you’ve put there suggests that you have)?

I ask because we call the exact same function in our game and it works - but the path we use is “/Game/Maps/”.

Incidentally, if you DID put the maps in a different location then you’re going to have to setup that directory to be packaged.

You can do that in the editor by opening your Project Settings (in the Edit menu) and then look at the Packaging section. In there you can add your directory under the "Additional Non-Asset Directories to Package).

…Or you can keep your maps in the normal place.

This is all a big assumption though!

ok, so I renamed the “Levels” folder to “Maps”, but I still get the same behavior: Working in editor, black screen when I ‘launch’ it or run the packaged game.

However I noticed something in the console when executing the C++ code:

LogStreaming:Error: Couldn't find file for package /Engine/Maps/Entry requested by async loading code.

I don’t know why the Entry map is requested (I have "/Game/Maps/Transition as transition map) but maybe that’s related to the problem.

Oops, when I tested it, the transition map was Engine/Maps/Entry.

Now I updated it and it’s working. :slight_smile:

Thank you for your help, I guess Entry wasn’t packaged and now that I changed the transition map to something that was packaged, it works.

Great, I’m glad you have it working now! :slight_smile: