From 10d39a80b6e8baaf540808d37542ed366328cec0 Mon Sep 17 00:00:00 2001 From: PHILIP WHITE Date: Wed, 6 Dec 2023 22:24:59 +0000 Subject: [PATCH] Add GenericStructs for Players in Lobby via JSON --- .../Source/CorruptedMemory/GenericStructs.h | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CorruptedMemory/Source/CorruptedMemory/GenericStructs.h diff --git a/CorruptedMemory/Source/CorruptedMemory/GenericStructs.h b/CorruptedMemory/Source/CorruptedMemory/GenericStructs.h new file mode 100644 index 0000000..74dc5f1 --- /dev/null +++ b/CorruptedMemory/Source/CorruptedMemory/GenericStructs.h @@ -0,0 +1,28 @@ +#pragma once + +#include "CoreMinimal.h" +#include "GenericStructs.generated.h" + +USTRUCT(BlueprintType) +struct FPlayerInLobby +{ + GENERATED_BODY() + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + FString Username; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + bool bIsOwner; + + FPlayerInLobby(FString Username, const bool bIsOwner) + { + this->Username = Username; + this->bIsOwner = bIsOwner; + } + + FPlayerInLobby() + { + this->Username = ""; + this->bIsOwner = false; + } +};