AActor::DebugShowOneComponentHierarchy
#include "GameFramework/Actor.h"
Access: public
Description
Prints the hierarchy of a single scene component and its children to the log. Called recursively by DebugShowComponentHierarchy to build the full tree output.
Caveats & Gotchas
- • NestLevel is passed by reference and mutated during recursion; if you call this directly, pass a local int32 initialised to 0 to avoid misaligned indentation.
- • Prefer DebugShowComponentHierarchy for printing the full actor hierarchy — this function is the recursive worker and is not meant to be the entry point.
Signature
ENGINE_API void DebugShowOneComponentHierarchy( USceneComponent* SceneComp, int32& NestLevel, bool bShowPosition ); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| SceneComp | USceneComponent* | The component whose subtree is printed. | — |
| NestLevel | int32& | Current indentation depth; incremented by each recursive call. | — |
| bShowPosition | bool | If true, prints world-space position alongside each component. | — |
Return Type
void Example
Print a subtree starting from a specific component C++
int32 NestLevel = 0;
MyActor->DebugShowOneComponentHierarchy(MyActor->GetRootComponent(), NestLevel, true); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?