RealDocs

AActor::DebugShowComponentHierarchy

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public

Description

Prints the full scene component attachment hierarchy of this actor to the log, optionally showing each component's world-space position. Useful for diagnosing attachment or transform issues.

Caveats & Gotchas

  • Output goes to the log via UE_LOG — it is not drawn on screen; you need to check the Output Log or console output.
  • This iterates the SceneComponent tree, so only scene components (those with a transform) appear; pure UActorComponents with no scene representation are omitted.

Signature

ENGINE_API void DebugShowComponentHierarchy( const TCHAR* Info, bool bShowPosition  = true);

Parameters

Name Type Description Default
Info const TCHAR* Optional label string printed at the top of the hierarchy dump.
bShowPosition bool If true, prints world-space position for each component. true

Return Type

void

Example

Dump hierarchy at runtime from console command C++
// Add a console command to an actor for quick debugging
if (APlayerController* PC = GetWorld()->GetFirstPlayerController())
{
    if (APawn* Pawn = PC->GetPawn())
    {
        Pawn->DebugShowComponentHierarchy(TEXT("PlayerPawn"), true);
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.