RealDocs

UActorComponent::GetReadableName

function Engine Since 4.0
#include "Components/ActorComponent.h"
Access: public Specifiers: virtualconst

Description

Returns a human-readable display name for this component, including the asset name if AdditionalStatObject() is provided. Used in stat output, visualizers, and debug overlays.

Caveats & Gotchas

  • The default implementation concatenates the component name with a space and the name of the object returned by AdditionalStatObject() — override AdditionalStatObject() rather than GetReadableName() to append asset names.
  • The returned string is intended for display and logging only; it is not stable or unique across sessions and should not be used as an identifier.
  • This can be called from stat commands on the render thread or game thread, so implementations must be thread-safe.

Signature

ENGINE_API virtual FString GetReadableName() const;

Return Type

FString

Example

Override AdditionalStatObject to enrich the readable name C++
UObject const* UMyMeshComponent::AdditionalStatObject() const
{
    // Appends the mesh asset name to this component's readable name in stats
    return StaticMesh;
}

// Result of GetReadableName() becomes e.g. "MyMeshComponent SM_Cube"

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.