AActor::DrawDebugComponents
#include "GameFramework/Actor.h"
Access: public
Description
Renders debug visualizations for the component tree of this actor in the world for one frame. Useful for inspecting component hierarchy and attachment at runtime.
Caveats & Gotchas
- • The debug draw persists for one frame only. Call it every tick (or in a loop) if you need persistent visualization during a play session.
- • This function draws using the in-world debug draw system; it will not appear in screen-space or in the Details panel. It requires a render context to be active and has no effect on dedicated servers.
Signature
ENGINE_API void DrawDebugComponents(FColor const& BaseColor=FColor::White) const Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| BaseColor | FColor const& | Base color for the debug visualizations. | FColor::White |
Return Type
void Example
Visualize component tree each tick during development C++
void AMyActor::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
#if !UE_BUILD_SHIPPING
DrawDebugComponents(FColor::Cyan);
#endif
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?