Lesson 56 - API Test HUD

This commit is contained in:
Norman Lansing
2026-03-26 21:38:50 -04:00
parent f093212884
commit 0fecdf2df7
10 changed files with 112 additions and 21 deletions

View File

@@ -117,26 +117,8 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="91dd7ef3-692f-484d-9bd1-060b29650efd" name="Changes" comment=""> <list default="true" id="91dd7ef3-692f-484d-9bd1-060b29650efd" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/.gitignore" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/encodings.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Config/DefaultEditor.ini" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Config/DefaultEngine.ini" beforeDir="false" afterPath="$PROJECT_DIR$/Config/DefaultEngine.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Config/DefaultGame.ini" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Config/DefaultInput.ini" beforeDir="false" afterPath="$PROJECT_DIR$/Config/DefaultInput.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Content/Blueprints/Game/BP_ShooterGameMode.uasset" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/FPSTemplate.uproject" beforeDir="false" afterPath="$PROJECT_DIR$/FPSTemplate.uproject" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/Private/DedicatedServersModule.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate.Target.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Source/FPSTemplate.Target.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/FPSTemplate.Build.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Source/FPSTemplate/FPSTemplate.Build.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/Private/Game/ShooterGameMode.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/Private/GameLift/GameLiftClp.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/Private/GameLiftClpTypes.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/Public/Game/ShooterGameMode.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/Public/Game/ShooterGameModeBase.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/FPSTemplate/Public/Game/ShooterGameModeBase.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/Public/GameLift/GameLiftClp.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/Public/GameLiftClp.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplate/Public/GameLiftClpTypes.h" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Source/FPSTemplateClient.Target.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Source/FPSTemplateClient.Target.cs" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -157,7 +139,11 @@
<component name="HighlightingSettingsPerFile"> <component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.Build.cs" root0="SKIP_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.Build.cs" root0="SKIP_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/Game/DS_GameMode.cpp" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/Game/DS_GameMode.cpp" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestHUD.cpp" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestOverlayClass.cpp" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/Game/DS_GameMode.h" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/Game/DS_GameMode.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestHUD.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestOverlayClass.h" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Source/FPSTemplate/FPSTemplate.Build.cs" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/Source/FPSTemplate/FPSTemplate.Build.cs" root0="FORCE_HIGHLIGHTING" />
</component> </component>
<component name="McpProjectServerCommands"> <component name="McpProjectServerCommands">
@@ -64927,7 +64913,7 @@
<workItem from="1773536227018" duration="61902000" /> <workItem from="1773536227018" duration="61902000" />
<workItem from="1774233517830" duration="18186000" /> <workItem from="1774233517830" duration="18186000" />
<workItem from="1774317832300" duration="32871000" /> <workItem from="1774317832300" duration="32871000" />
<workItem from="1774531822750" duration="4727000" /> <workItem from="1774531822750" duration="6195000" />
</task> </task>
<task id="LOCAL-00001" summary="Added in EC2 support and adjusted Anywhere if statement to allow EC2 and to clean uip variable placement."> <task id="LOCAL-00001" summary="Added in EC2 support and adjusted Anywhere if statement to allow EC2 and to clean uip variable placement.">
<option name="closed" value="true" /> <option name="closed" value="true" />

View File

@@ -12,3 +12,38 @@ ConnectionType=USBOnly
bUseManualIPAddress=False bUseManualIPAddress=False
ManualIPAddress= ManualIPAddress=
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
DefaultGraphicsRHI=DefaultGraphicsRHI_Default
-D3D12TargetedShaderFormats=PCD3D_SM5
+D3D12TargetedShaderFormats=PCD3D_SM5
+D3D12TargetedShaderFormats=PCD3D_SM6
-D3D11TargetedShaderFormats=PCD3D_SM5
+D3D11TargetedShaderFormats=PCD3D_SM5
bGenerateNaniteFallbackMeshes=True
Compiler=Default
AudioSampleRate=48000
AudioCallbackBufferFrameSize=1024
AudioNumBuffersToEnqueue=1
AudioMaxChannels=0
AudioNumSourceWorkers=4
SpatializationPlugin=
SourceDataOverridePlugin=
ReverbPlugin=
OcclusionPlugin=
CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0)
CacheSizeKB=65536
MaxChunkSizeOverrideKB=0
bResampleForDevice=False
MaxSampleRate=48000.000000
HighSampleRate=32000.000000
MedSampleRate=24000.000000
LowSampleRate=12000.000000
MinSampleRate=8000.000000
CompressionQualityModifier=1.000000
AutoStreamingThreshold=0.000000
SoundCueCookQualityIndex=-1
[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Maps/StartupMap.StartupMap
GameDefaultMap=/Game/Maps/StartupMap.StartupMap

View File

@@ -19,6 +19,7 @@ public class DedicatedServers : ModuleRules
{ {
"Slate", "Slate",
"SlateCore", "SlateCore",
"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.

View File

@@ -0,0 +1,18 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "UI/APITest/APITestHUD.h"
#include "UI/APITest/APITestOverlay.h"
void AAPITestHUD::BeginPlay()
{
Super::BeginPlay();
APlayerController* PlayerController = GetOwningPlayerController();
if (IsValid(PlayerController) && APITestOverlayClass)
{
APITestOverlay = CreateWidget<UAPITestOverlay>(PlayerController, APITestOverlayClass);
APITestOverlay->AddToViewport();
}
}

View File

@@ -0,0 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "UI/APITest/APITestOverlay.h"

View File

@@ -0,0 +1,31 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
class UAPITestOverlay;
#include "CoreMinimal.h"
#include "GameFramework/HUD.h"
#include "APITestHUD.generated.h"
/**
*
*/
UCLASS()
class DEDICATEDSERVERS_API AAPITestHUD : public AHUD
{
GENERATED_BODY()
public:
UPROPERTY(EditDefaultsOnly)
TSubclassOf<UAPITestOverlay> APITestOverlayClass;
protected:
virtual void BeginPlay() override;
private:
UPROPERTY()
TObjectPtr<UAPITestOverlay> APITestOverlay;
};

View 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()
};