Lesson 83 - Travelling To The Server
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#include "GameFramework/PlayerState.h"
|
#include "GameFramework/PlayerState.h"
|
||||||
#include "GameplayTags/DedicatedServerTags.h"
|
#include "GameplayTags/DedicatedServerTags.h"
|
||||||
#include "Interfaces/IHttpResponse.h"
|
#include "Interfaces/IHttpResponse.h"
|
||||||
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "UI/HTTP/HTTPRequestTypes.h"
|
#include "UI/HTTP/HTTPRequestTypes.h"
|
||||||
|
|
||||||
void UPortalManager::JoinGameSession()
|
void UPortalManager::JoinGameSession()
|
||||||
@@ -163,5 +164,9 @@ void UPortalManager::FindPlayerSession_Response(FHttpRequestPtr Request, FHttpRe
|
|||||||
FJsonObjectConverter::JsonObjectToUStruct(JsonObject.ToSharedRef(), &PlayerSession);
|
FJsonObjectConverter::JsonObjectToUStruct(JsonObject.ToSharedRef(), &PlayerSession);
|
||||||
|
|
||||||
PlayerSession.Dump();
|
PlayerSession.Dump();
|
||||||
|
|
||||||
|
const FString IPAndPort = PlayerSession.IpAddress + TEXT(":") + FString::FromInt(PlayerSession.Port);
|
||||||
|
const FName Address(*IPAndPort);
|
||||||
|
UGameplayStatics::OpenLevel(this, Address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user