Space Plunder
Loading...
Searching...
No Matches
GameplayDebuggerCatergory_Base.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#if WITH_GAMEPLAY_DEBUGGER
6
7#include "CoreMinimal.h"
8#include "GameplayDebuggerCategory.h"
9#include "GameplayDebuggerTypes.h"
10
11
12class AActor;
13class APlayerController;
14
15class FGameplayDebuggerCategory_Base : public FGameplayDebuggerCategory
16{
17
18public:
19 FGameplayDebuggerCategory_Base();
20
21 // virtual void CollectData(APlayerController* OwnerPC, AActor* DebugActor) override;
22 virtual void DrawData(APlayerController* OwnerPC, FGameplayDebuggerCanvasContext& CanvasContext) override;
23
24 static TSharedRef<FGameplayDebuggerCategory> MakeInstance();
25
26 APawn* GetSelectedPawn(const APlayerController* OwnerPC, AActor* DebugActor);
27 static bool GetOverheadLocation(const AActor& DebugActor, const FGameplayDebuggerCanvasContext& CanvasContext, const FString& String, float& PosX, float& PosY);
28
29protected:
30 const FString True = FString("true");
31 const FString False = FString("false");
32
33
35 void CycleActorReference();
37 void CycleDebugActors();
38
39
40 enum class EActorReferenceMode : uint8
41 {
42 PlayerActorOnly,
43 PlayerActor,
44 DebugActor
45 };
46 EActorReferenceMode ActorReferenceMode = EActorReferenceMode::DebugActor;
47 TWeakObjectPtr<const APawn> PrevDebugActorReference;
48 bool bChangeDebugActor = false;
49 bool bDrawOverheadInfo = false;
50
51 struct FRepData
52 {
53 FString PawnName;
54 bool bCanChangeReference = false;
55 bool bIsUsingPlayerActor = false;
56
57 void Serialize(FArchive& Ar);
58 };
59 FRepData BaseDataPack;
60
61};
62
63
64#endif