UKismetSystemLibrary::FlushPersistentDebugLines
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Clears every persistent debug line and shape (lines, boxes, spheres, capsules, etc.) drawn in the given world, regardless of remaining Duration.
Caveats & Gotchas
- • Clears all persistent debug shapes in the world, not just ones drawn by the calling object.
- • Does not clear debug strings drawn with DrawDebugString — use FlushDebugStrings separately for those.
- • Compiled out entirely in Shipping and Test builds since the UFUNCTION is DevelopmentOnly.
Signature
static void FlushPersistentDebugLines(const UObject* WorldContextObject) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| WorldContextObject | const UObject* | World context identifying which world's persistent debug shapes to clear. | — |
Return Type
void Example
Clear all debug shapes on level restart C++
UKismetSystemLibrary::FlushPersistentDebugLines(this); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?