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
(
FPrimitiveDrawInterface* InPrimitiveDrawInterface |
Make a debug drawer for a FPrimitiveDrawInterface | DrawDebugLibrary.h | |
FDebugDrawer
(
UWorld* InWorld |
Make a debug drawer for a UWorld | DrawDebugLibrary.h | |
FDebugDrawer
(
UObject* InObject |
Make a debug drawer for a UObject | DrawDebugLibrary.h | |
FDebugDrawer
(
FAnimInstanceProxy* InAnimInstanceProxy |
Make a debug drawer for an AnimInstanceProxy | DrawDebugLibrary.h | |
FDebugDrawer () |
Make a null debug drawer which ignores draw commands | DrawDebugLibrary.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| 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 | |
| PDI | FPrimitiveDrawInterface * | Primitive Draw Interface - used for drawing in editor viewports. | DrawDebugLibrary.h | |
| VisualLoggerCategory | FName | Visual Logger Category. | DrawDebugLibrary.h | |
| VisualLoggerObject | TObjectPtr< 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 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 () |
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 MakeDebugDrawer
(
UWorld* World |
Make a debug drawer for a UWorld | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
FAnimInstanceProxy* AnimInstanceProxy |
Make a debug drawer for an AnimInstanceProxy | DrawDebugLibrary.h | |
static FDebugDrawer MakeDebugDrawer
(
FPrimitiveDrawInterface* PrimitiveDrawInterface |
Make a debug drawer for a FPrimitiveDrawInterface | 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 MakeVisualLoggerDebugDrawer
(
UObject* Object, |
Make a debug drawer for the Visual Logger | DrawDebugLibrary.h | |
static FDebugDrawer MakeVisualLoggerDebugDrawer
(
UObject* Object, |
Make a debug drawer for the Visual Logger | DrawDebugLibrary.h |