Space Plunder
Loading...
Searching...
No Matches
GameplayDebuggerCatergory_Selector.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_Selector : public FGameplayDebuggerCategory
16{
17
18public:
19 FGameplayDebuggerCategory_Selector();
20
21
22 virtual void CollectData(APlayerController* OwnerPC, AActor* DebugActor) override;
23 virtual void DrawData(APlayerController* OwnerPC, FGameplayDebuggerCanvasContext& CanvasContext) override;
24
25 static TSharedRef<FGameplayDebuggerCategory> MakeInstance();
26
27 // APawn* GetSelectedPawn(const APlayerController* OwnerPC, AActor* DebugActor);
28
29protected:
30
31 void HighlightActor(const AActor* Actor);
32 void OutlineActorMesh(const AActor* Actor, const bool bTurnOn);
33
34 void ToggleHighlightMethod();
35 void SetHighlightActor(const bool bValue);
36 void SetOutlineMesh(const bool bValue);
37 void SetShowNameOverhead(const bool bValue);
38
39 enum EHighlightMethod
40 {
41 None,
42 Name,
43 ActorBox,
44 Outline
45 };
46
47 AActor* PreviousDebugActor = nullptr;
48
49 enum class EActorReferenceMode : uint8
50 {
51 PlayerActorOnly,
52 PlayerActor,
53 DebugActor
54 };
55 EActorReferenceMode ActorReferenceMode = EActorReferenceMode::DebugActor;
56 TWeakObjectPtr<const APawn> PrevDebugActorReference;
57 bool bChangeDebugActor = false;
58 bool bDrawOverheadInfo = true;
59
60 EHighlightMethod HighlightMethod = Name;
61 bool bActorOutlined = false;
62 int32 PreviousDepthValue = 0;
63
64 struct FRepData
65 {
66 FString PawnName;
67 bool bCanChangeReference = false;
68 bool bIsUsingPlayerActor = false;
69 // bool bActorOutlined = false;
70 // int32 PreviousDepthValue = 0;
71
72 void Serialize(FArchive& Ar);
73 };
74 FRepData DataPack;
75};
76
77
78
79#endif