ServerTravel() does not work in the packaged version

The project on UE 5.1, made on it originally. The Host() function works fine when called in editor. However, when I try to repeat the same thing in the packaged version, nothing happens. In the logs says that the game can not find the map “ThirdPersonMap”, reference to it I checked several times, including copying. Here is the code:

void UPuzzlePlatformsGameInstance::Host()
{
	UWorld* World = GetWorld();
	if (World)
	{
		World->ServerTravel("/Game/ThirdPerson/Maps/ThirdPersonMap?listen");
	}
}

Also attaching the logs from the packaged version:

[2023.02.02-19.11.42:676][381]LogLoad: LoadMap: /Game/ThirdPerson/Maps/ThirdPersonMap?Name=Player?listen
[2023.02.02-19.11.42:676][381]LogWorld: BeginTearingDown for /Game/ThirdPerson/Maps/Lobby
[2023.02.02-19.11.42:678][381]LogWorld: UWorld::CleanupWorld for Lobby, bSessionEnded=true, bCleanupResources=true
[2023.02.02-19.11.42:678][381]LogSlate: InvalidateAllWidgets triggered.  All widgets were invalidated
…
[2023.02.02-19.11.42:729][381]LogStreaming: Warning: LoadPackage: SkipPackage: /Game/ThirdPerson/Maps/ThirdPersonMap (0x4E47B0E053B7833B) - The package to load does not exist on disk or in the loader
[2023.02.02-19.11.42:729][381]LogLoad: Warning: UEngine::TickWorldTravel failed to Handle server travel to URL: /Game/ThirdPerson/Maps/ThirdPersonMap?Name=Player?listen. Error: Failed to load package '/Game/ThirdPerson/Maps/ThirdPersonMap'
[2023.02.02-19.11.42:729][381]LogNet: Browse: /Game/ThirdPerson/Maps/Lobby?Name=Player
[2023.02.02-19.11.42:729][381]LogLoad: LoadMap: /Game/ThirdPerson/Maps/Lobby?Name=Player
…
[2023.02.02-19.11.42:737][381]LogLoad: Game class is 'PuzzlePlatformsGameMode'
[2023.02.02-19.11.42:737][381]LogWorld: Bringing World /Game/ThirdPerson/Maps/Lobby.Lobby up for play (max tick rate 0) at 2023.02.02-20.11.42

What could be the problem? Why can’t the game find the level on the path?

1 Like

UE 5.1 does not include all the maps you need to go to the settings for packaging your project and in advanced, either include the maps you want or tick the option to package all maps.

3 Likes

Thank you so much, I found this setting, now everything works

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms