Compare commits
2 Commits
2ec989d34a
...
898fba8153
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
898fba8153 | ||
|
|
f52a4225c3 |
@@ -2,8 +2,8 @@
|
|||||||
CommonUI.Debug.CheckGameViewportClientValid=0
|
CommonUI.Debug.CheckGameViewportClientValid=0
|
||||||
|
|
||||||
[/Script/EngineSettings.GameMapsSettings]
|
[/Script/EngineSettings.GameMapsSettings]
|
||||||
GameDefaultMap=/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap
|
GameDefaultMap=/Game/Maps/StartupMap.StartupMap
|
||||||
EditorStartupMap=/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap
|
EditorStartupMap=/Game/Maps/StartupMap.StartupMap
|
||||||
GlobalDefaultGameMode=/Game/Blueprints/Game/BP_ShooterGameModeBase.BP_ShooterGameModeBase_C
|
GlobalDefaultGameMode=/Game/Blueprints/Game/BP_ShooterGameModeBase.BP_ShooterGameModeBase_C
|
||||||
ServerDefaultMap=/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap
|
ServerDefaultMap=/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
Content/DedicatedServers/APITest/UI/BP_APITestHUD.uasset
Normal file
BIN
Content/DedicatedServers/APITest/UI/BP_APITestHUD.uasset
Normal file
Binary file not shown.
BIN
Content/DedicatedServers/APITest/UI/WBP_APITestOverlay.uasset
Normal file
BIN
Content/DedicatedServers/APITest/UI/WBP_APITestOverlay.uasset
Normal file
Binary file not shown.
@@ -21,7 +21,8 @@ public class DedicatedServers : ModuleRules
|
|||||||
{
|
{
|
||||||
"Slate",
|
"Slate",
|
||||||
"SlateCore",
|
"SlateCore",
|
||||||
"OpenSSL"
|
"OpenSSL",
|
||||||
|
"UMG"
|
||||||
});
|
});
|
||||||
|
|
||||||
// Adds in the plugin for GameLiftServerSDK if it is the server build.
|
// Adds in the plugin for GameLiftServerSDK if it is the server build.
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ void ADS_GameMode::BeginPlay()
|
|||||||
void ADS_GameMode::InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)
|
void ADS_GameMode::InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)
|
||||||
{
|
{
|
||||||
Super::InitGame(MapName, Options, ErrorMessage);
|
Super::InitGame(MapName, Options, ErrorMessage);
|
||||||
|
|
||||||
|
#if WITH_GAMELIFT
|
||||||
|
|
||||||
CachedCommandLine = FCommandLine::Get();
|
CachedCommandLine = FCommandLine::Get();
|
||||||
|
|
||||||
const FPortResult PortResult = cmdlineparser::details::GetConfiguredOrDefaultPort(CachedCommandLine, TEXT("port"));;
|
const FPortResult PortResult = cmdlineparser::details::GetConfiguredOrDefaultPort(CachedCommandLine, TEXT("port"));;
|
||||||
@@ -39,6 +42,8 @@ void ADS_GameMode::InitGame(const FString& MapName, const FString& Options, FStr
|
|||||||
UE_LOGFMT(LogDS_GameMode, Log, "Fleet type: EC2");
|
UE_LOGFMT(LogDS_GameMode, Log, "Fleet type: EC2");
|
||||||
// TODO: EC2 configuration
|
// TODO: EC2 configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FString ADS_GameMode::GetSHA256Hash(const FString& InString)
|
FString ADS_GameMode::GetSHA256Hash(const FString& InString)
|
||||||
@@ -320,6 +325,7 @@ void ADS_GameMode::LogAnywhereFleetParameters()
|
|||||||
|
|
||||||
void ADS_GameMode::LogServerParameters(const FServerParameters& InServerParameters)
|
void ADS_GameMode::LogServerParameters(const FServerParameters& InServerParameters)
|
||||||
{
|
{
|
||||||
|
#if WITH_GAMELIFT
|
||||||
UE_LOGFMT(LogDS_GameMode, Log, ">>>> WebSocket URL: {WebSocketUrl}", InServerParameters.m_webSocketUrl);
|
UE_LOGFMT(LogDS_GameMode, Log, ">>>> WebSocket URL: {WebSocketUrl}", InServerParameters.m_webSocketUrl);
|
||||||
UE_LOGFMT(LogDS_GameMode, Log, ">>>> Fleet ID: {FleetId}", InServerParameters.m_fleetId);
|
UE_LOGFMT(LogDS_GameMode, Log, ">>>> Fleet ID: {FleetId}", InServerParameters.m_fleetId);
|
||||||
UE_LOGFMT(LogDS_GameMode, Log, ">>>> Process ID: {ProcessId}", InServerParameters.m_processId);
|
UE_LOGFMT(LogDS_GameMode, Log, ">>>> Process ID: {ProcessId}", InServerParameters.m_processId);
|
||||||
@@ -345,6 +351,7 @@ void ADS_GameMode::LogServerParameters(const FServerParameters& InServerParamete
|
|||||||
{
|
{
|
||||||
UE_LOGFMT(LogDS_GameMode, Log, ">>>> Session Token: {SessionToken}", GetValueOrHash(InServerParameters.m_sessionToken));
|
UE_LOGFMT(LogDS_GameMode, Log, ">>>> Session Token: {SessionToken}", GetValueOrHash(InServerParameters.m_sessionToken));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FString ADS_GameMode::GetValueOrHash(const FString& Value)
|
FString ADS_GameMode::GetValueOrHash(const FString& Value)
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "UI/API_Test/APITestOverlay.h"
|
||||||
17
Source/DedicatedServers/Private/UI/API_Test/API_TestHUD.cpp
Normal file
17
Source/DedicatedServers/Private/UI/API_Test/API_TestHUD.cpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "UI/API_Test/API_TestHUD.h"
|
||||||
|
#include "UI/API_Test/APITestOverlay.h"
|
||||||
|
|
||||||
|
void AAPI_TestHUD::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
APlayerController* PlayerController = GetOwningPlayerController();
|
||||||
|
if (IsValid(PlayerController) && APITestOverlayClass)
|
||||||
|
{
|
||||||
|
APITestOverlay = CreateWidget<UAPITestOverlay>(PlayerController, APITestOverlayClass);
|
||||||
|
APITestOverlay->AddToViewport();
|
||||||
|
}
|
||||||
|
}
|
||||||
16
Source/DedicatedServers/Public/UI/API_Test/APITestOverlay.h
Normal file
16
Source/DedicatedServers/Public/UI/API_Test/APITestOverlay.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Blueprint/UserWidget.h"
|
||||||
|
#include "APITestOverlay.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class DEDICATEDSERVERS_API UAPITestOverlay : public UUserWidget
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
};
|
||||||
29
Source/DedicatedServers/Public/UI/API_Test/API_TestHUD.h
Normal file
29
Source/DedicatedServers/Public/UI/API_Test/API_TestHUD.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/HUD.h"
|
||||||
|
#include "API_TestHUD.generated.h"
|
||||||
|
|
||||||
|
class UAPITestOverlay;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class DEDICATEDSERVERS_API AAPI_TestHUD : public AHUD
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
TSubclassOf<UAPITestOverlay> APITestOverlayClass;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
UPROPERTY()
|
||||||
|
TObjectPtr<UAPITestOverlay> APITestOverlay;
|
||||||
|
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user