UActorComponent::AdditionalStatObject
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtualconst
Description
Override to return a UObject (typically an asset) whose name will be appended to this component's readable name in stat displays and debug output. The base implementation returns nullptr.
Caveats & Gotchas
- • Returning a non-null object causes GetReadableName() to append a space and the object's GetName() — keep the returned object's name short to avoid truncation in stat overlays.
- • The returned pointer must remain valid for the lifetime of any stat output; do not return a pointer that may be garbage collected.
- • This is purely a display hint — it has no effect on component functionality, serialization, or networking.
Signature
virtual UObject const* AdditionalStatObject() const Return Type
UObject const* Example
Return the source mesh asset for display in stat output C++
UObject const* UMyStaticMeshComponent::AdditionalStatObject() const
{
// Shows 'ComponentName MeshAssetName' in stat unit output
return GetStaticMesh();
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?