Navigation
API > API/Plugins > API/Plugins/DrawDebugLibrary
A simple Blueprint wrapper around different objects that are capable of debug drawing. This allows us to use the same blueprint interface and functions for debug drawing if we are drawing using a UWorld object or a FPrimitiveDrawInterface object (for example). Since this contains raw pointers it should not be stored anywhere as these could become stale. It should always be treated as a temporary object.
| Name | FDebugDrawer |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/DrawDebugLibrary/Source/DrawDebugLibrary/Public/DrawDebugLibrary.h |
| Include Path | #include "DrawDebugLibrary.h" |
Syntax
USTRUCT (BlueprintType , Category="Draw Debug Library",
Meta=(HasNativeMake="/Script/DrawDebugLibrary.DrawDebugLibrary.MakeDebugDrawer"))
struct FDebugDrawer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDebugDrawer
(
FRigVMDrawInterface* InRigVMDrawInterface, |
Make a debug drawer for a FRigVMDrawInterface | DrawDebugLibrary.h | |
FDebugDrawer
(
const TSharedPtr< FDebugDrawerCanvasBuffer >& InCanvasBuffer |
Make a debug drawer for the given canvas buffer. | DrawDebugLibrary.h | |
FDebugDrawer
(
UCanvas* InCanvas |
Make a debug drawer for a UCanvas | DrawDebugLibrary.h | |
FDebugDrawer
(
FPrimitiveDrawInterface* InPrimitiveDrawInterface |
Make a debug drawer for a FPrimitiveDrawInterface | DrawDebugLibrary.h | |
FDebugDrawer
(
FAnimInstanceProxy* InAnimInstanceProxy |
Make a debug drawer for an AnimInstanceProxy | DrawDebugLibrary.h | |
FDebugDrawer
(
UAnimInstance* InAnimInstance |
Make a debug drawer for an AnimInstance | DrawDebugLibrary.h | |
FDebugDrawer
(
FCanvas* InCanvas |
Make a debug drawer for a FCanvas | DrawDebugLibrary.h | |
FDebugDrawer
(
UObject* InObject |
Make a debug drawer for a UObject | DrawDebugLibrary.h | |
FDebugDrawer () |
Make a null debug drawer which ignores draw commands | DrawDebugLibrary.h | |
FDebugDrawer
(
UWorld* InWorld |
Make a debug drawer for a UWorld | DrawDebugLibrary.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FDebugDrawer() |
Forward declaration of destructor | DrawDebugLibrary.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AnimInstance | TObjectPtr< UAnimInstance > | Anim Instance Object - used for debug drawing in an AnimBlueprints. | DrawDebugLibrary.h | |
| AnimInstanceProxy | FAnimInstanceProxy * | Anim Instance Proxy Object - used for debug drawing in an AnimNode. | DrawDebugLibrary.h | |
| bVisualLoggerDrawToScene | bool | Visual Logger if to also draw to scene | DrawDebugLibrary.h | |
| bVisualLoggerDrawToSceneWhileRecording | bool | Visual Logger if to also draw while recording | DrawDebugLibrary.h | |
| Canvas | FCanvas * | Canvas pointer - used for writing to a 2D canvas | DrawDebugLibrary.h | |
| CanvasBuffer | TSharedPtr< FDebugDrawerCanvasBuffer > | Canvas buffer used for writing to a canvas at a later point | DrawDebugLibrary.h | |
| CanvasScale | float | Canvas Scale | DrawDebugLibrary.h | |
| PDI | FPrimitiveDrawInterface * | Primitive Draw Interface - used for drawing in editor viewports. | DrawDebugLibrary.h | |
| RigVM | FRigVMDrawInterface * | RigVM Draw Interface - used for drawing in a RigVM context. | DrawDebugLibrary.h | |
| RigVMComponent | TObjectPtr< const USceneComponent > | Component which the RigVM context is attached to | DrawDebugLibrary.h | |
| VisualLoggerCategory | FName | Visual Logger Category. | DrawDebugLibrary.h | |
| VisualLoggerObject | TObjectPtr< const UObject > | Visual Logger Object - used for writing to the visual logger. | DrawDebugLibrary.h | |
| VisualLoggerVerbosity | ELogVerbosity::Type | Visual Logger Verbosity. | DrawDebugLibrary.h | |
| World | TObjectPtr< UWorld > | World object - used for normal debug drawing. | DrawDebugLibrary.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CanvasDrawText
(
const FVector2D& Location, |
DrawDebugLibrary.h | ||
void DrawLines
(
const TArrayView< const TPair< FVector, FVector > > Segments, |
DrawDebugLibrary.h | ||
void DrawPoints
(
const TArrayView< const FVector > Locations, |
DrawDebugLibrary.h | ||
void VisualLoggerDrawString
(
const FStringView String, |
DrawDebugLibrary.h | ||
void VisualLoggerLogString
(
const FStringView String, |
DrawDebugLibrary.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FDebugDrawer MakeDebugDrawer
(
UCanvas* InCanvas, |
Make a debug drawer for a UCanvas | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
FCanvas* InCanvas, |
Make a debug drawer for a FCanvas | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
FRigVMDrawInterface* InRigVMDrawInterface, |
Make a debug drawer for a FRigVMDrawInterface | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
const TSharedPtr< FDebugDrawerCanvasBuffer >& CanvasBuffer |
Make a debug drawer for the given canvas buffer. | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
FPrimitiveDrawInterface* PrimitiveDrawInterface |
Make a debug drawer for a FPrimitiveDrawInterface | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
FAnimInstanceProxy* AnimInstanceProxy |
Make a debug drawer for an AnimInstanceProxy | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
UAnimInstance* AnimInstance |
Make a debug drawer for an AnimInstance | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
UWorld* World |
Make a debug drawer for a UWorld | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer () |
Make a null debug drawer which ignores draw commands | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
UObject* Object |
Make a debug drawer for a UObject | DrawDebugLibrary.h | |
static FDebugDrawer MakeMergedDebugDrawer
(
const TArrayView< const FDebugDrawer > DebugDrawers |
Make a debug drawer by merging multiple other debug drawers of different types | DrawDebugLibrary.h | |
static FDebugDrawer MakeScreenDebugDrawer
(
const float Scale |
Make a debug drawer for the default viewport canvas. | DrawDebugLibrary.h | |
static FDebugDrawer MakeVisualLoggerDebugDrawer
(
const UObject* Object, |
Make a debug drawer for the Visual Logger | DrawDebugLibrary.h | |
static FDebugDrawer MakeVisualLoggerDebugDrawer
(
const UObject* Object, |
Make a debug drawer for the Visual Logger | DrawDebugLibrary.h |