Files
DedicatedServerCourse/Source/FPSTemplate/Public/Game/ShooterGameMode.h

66 lines
1.3 KiB
C
Raw Normal View History

2026-02-24 22:39:26 -05:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "ShooterGameModeBase.h"
#include "ShooterGameMode.generated.h"
DECLARE_LOG_CATEGORY_EXTERN(LogShooterGameMode, Log, All);
struct FProcessParameters;
struct FServerParameters;
2026-02-24 22:39:26 -05:00
/**
*
*/
UCLASS()
class FPSTEMPLATE_API AShooterGameMode : public AShooterGameModeBase
{
GENERATED_BODY()
public:
AShooterGameMode();
2026-02-24 22:39:26 -05:00
protected:
UPROPERTY(Config, BlueprintReadOnly)
bool bIsAnywhereFleet = false;
UPROPERTY(Config, BlueprintReadOnly)
FString FleetId;
UPROPERTY(Config, BlueprintReadOnly)
FString AuthToken;
UPROPERTY(Config, BlueprintReadOnly)
FString HostId;
UPROPERTY(Config, BlueprintReadOnly)
FString WebSocketUrl;
UPROPERTY(Config)
FString ServerRegion;
UPROPERTY(Config, BlueprintReadOnly)
int32 ServerPort;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool bDebugMode = false;
2026-02-24 22:39:26 -05:00
virtual void BeginPlay() override;
virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage) override;
2026-02-24 22:39:26 -05:00
private:
FString CachedCommandLine;
TSharedPtr<FProcessParameters> ProcessParameters;
TSharedPtr<FServerParameters> ServerParameters;
int32 GetConfiguredOrDefaultPort() const;
2026-02-24 22:39:26 -05:00
#if WITH_GAMELIFT
void InitGameLift();
2026-02-24 22:39:26 -05:00
#endif
};