From b7c4a07d00a3bba13db061adb0ac25670b2546fa Mon Sep 17 00:00:00 2001 From: Norman Lansing Date: Sun, 5 Apr 2026 20:57:35 -0400 Subject: [PATCH] Lesson 83 - Travelling To The Server --- Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp b/Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp index d6da2668..3def3ade 100644 --- a/Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp +++ b/Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp @@ -9,6 +9,7 @@ #include "GameFramework/PlayerState.h" #include "GameplayTags/DedicatedServerTags.h" #include "Interfaces/IHttpResponse.h" +#include "Kismet/GameplayStatics.h" #include "UI/HTTP/HTTPRequestTypes.h" void UPortalManager::JoinGameSession() @@ -163,5 +164,9 @@ void UPortalManager::FindPlayerSession_Response(FHttpRequestPtr Request, FHttpRe FJsonObjectConverter::JsonObjectToUStruct(JsonObject.ToSharedRef(), &PlayerSession); PlayerSession.Dump(); + + const FString IPAndPort = PlayerSession.IpAddress + TEXT(":") + FString::FromInt(PlayerSession.Port); + const FName Address(*IPAndPort); + UGameplayStatics::OpenLevel(this, Address); } }