Files
UnrealEngineUWP/Engine/Source/Developer/GameplayDebugger/Public/GameplayDebuggerRenderingComponent.h
2020-02-06 13:13:41 -05:00

49 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "Components/PrimitiveComponent.h"
#include "DebugRenderSceneProxy.h"
#include "GameplayDebuggerRenderingComponent.generated.h"
class FGameplayDebuggerCompositeSceneProxy;
class FGameplayDebuggerDebugDrawDelegateHelper : public FDebugDrawDelegateHelper
{
typedef FDebugDrawDelegateHelper Super;
public:
~FGameplayDebuggerDebugDrawDelegateHelper()
{
Reset();
}
void Reset();
void AddDelegateHelper(FDebugDrawDelegateHelper* InDebugDrawDelegateHelper);
virtual void RegisterDebugDrawDelgate() override;
virtual void UnregisterDebugDrawDelgate() override;
private:
TArray<FDebugDrawDelegateHelper*> DebugDrawDelegateHelpers;
};
UCLASS(NotBlueprintable, NotBlueprintType, noteditinlinenew, hidedropdown, Transient)
class UGameplayDebuggerRenderingComponent : public UPrimitiveComponent
{
GENERATED_UCLASS_BODY()
virtual FPrimitiveSceneProxy* CreateSceneProxy() override;
virtual FBoxSphereBounds CalcBounds(const FTransform &LocalToWorld) const override;
virtual void CreateRenderState_Concurrent(FRegisterComponentContext* Context) override;
virtual void DestroyRenderState_Concurrent() override;
FGameplayDebuggerDebugDrawDelegateHelper GameplayDebuggerDebugDrawDelegateHelper;
};