Hello,
So I’m trying to connect to a listen server by doing
FString ResolvedString;
SessionInterface->GetResolvedConnectString(SearchResult, NAME_GamePort, ResolvedString);
UE_LOG(LogSpyderweb_EOS, Warning, TEXT("Resolved Connect String [%s]"), *ResolvedString);
if(IsValid(GetWorld()->GetFirstPlayerController()))
{
GetWorld()->GetFirstPlayerController()->ClientTravel(ResolvedString, TRAVEL_Absolute);
}
This is getting me this in the log:
[2024.07.13-16.09.10:621][827]LogSpyderweb_EOS: Warning: Resolved Connect String [EOS:00023cd3814d420c891eae915d39e8d4:GameNetDriver:26]
[2024.07.13-16.09.10:621][828]LogGlobalStatus: UEngine::Browse Started Browse: “EOS:00023cd3814d420c891eae915d39e8d4:GameNetDriver:26/Game/UI/Menus/MainMenu/MainMenu”
The Main Menu is the Game Default map, whereas the server should be on the LobbyMenu.
I’ve read through the documentation here: Travelling in Multiplayer in Unreal Engine | Unreal Engine 5.4 Documentation | Epic Developer Community
I’m doing an absolute non-seamless travel to the server map from the host here:
bool UEOS_SessionManagementSubsystem::AttemptServerTravelTo(const TSoftObjectPtr<UWorld>& Map, bool bAbsolute)
{
// Check if the Map is valid and that we are in a session that is hosting
if(Map.IsNull() || !SessionInterface || !SessionInterface->GetNamedSession(CurrentSessionName)->bHosting)
{
UE_LOG(LogSpyderweb_EOS, Warning, TEXT("Map is invalid or we are not hosting a session"));
return false;
}
UE_LOG(LogSpyderweb_EOS, Warning, TEXT("Server Travel to the Map: [%s]"), *Map.ToString());
const FString LevelName = *FPackageName::ObjectPathToPackageName(Map.ToString());
UE_LOG(LogSpyderweb_EOS, Warning, TEXT("Level URL: [%s]"), *LevelName);
return GetWorld()->ServerTravel(LevelName + "?listen", true);
}
This does get the host to the correct map. I’m considering if this is the line that is causing the problem though, as before I had the level stored as a string with just the name of the level and it seemed to work fine. This has started to break after this upgrade. Here is the log:
[2024.07.13-16.07.28:218][ 32]LogSpyderweb_EOS: Warning: Server Travel to the Map: [/Game/UI/Menus/LobbyMenu/LobbyMenu.LobbyMenu]
[2024.07.13-16.07.28:218][ 32]LogSpyderweb_EOS: Warning: Level URL: [/Game/UI/Menus/LobbyMenu/LobbyMenu]
[2024.07.13-16.07.28:218][ 32]LogGameMode: ProcessServerTravel: /Game/UI/Menus/LobbyMenu/LobbyMenu?listen