UAnimInstance::GatherDebugData
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIvirtual
Description
Collects debug information from all active animation graph nodes into the provided debug data structure. Called by the animation debugger and the ShowDebug Animation console command to visualize the current state of the animation blueprint.
Caveats & Gotchas
- • This function traverses the entire active animation graph and can be expensive on complex animation blueprints with many nodes. It is intended for development builds only — the overhead is non-trivial on characters with layered graphs and many active montages.
- • Override this in custom anim instances if you have custom node types that need to report debug information. Always call Super::GatherDebugData to ensure base graph nodes are still collected.
Signature
ENGINE_API virtual void GatherDebugData(FNodeDebugData& DebugData); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DebugData | FNodeDebugData& | The debug data collector that accumulates node names, weights, and timing information from the animation graph. | — |
Return Type
void Example
Override to add custom debug info C++
void UMyAnimInstance::GatherDebugData(FNodeDebugData& DebugData)
{
Super::GatherDebugData(DebugData);
FString CustomInfo = FString::Printf(TEXT("Custom blend state: %s"),
*UEnum::GetValueAsString(CurrentBlendState));
DebugData.AddDebugItem(CustomInfo);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?