AActor::GetHumanReadableName
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtual
Description
Returns a human-readable string name for this actor, suitable for display in debug output and logs. The default implementation returns the actor's object name.
Caveats & Gotchas
- • The returned string is not localized and is not intended for display in shipped UI. Use dedicated display name properties or a custom data table for player-visible names.
- • The default implementation calls GetName(), which returns the internal UObject name (e.g. 'BP_Enemy_C_0'). Override this to return a game-meaningful label for debugging tools or editor widgets.
Signature
virtual FString GetHumanReadableName() const Return Type
FString Example
Override to return a meaningful game name C++
FString AMyNPC::GetHumanReadableName() const
{
return FString::Printf(TEXT("%s (NPC, HP: %.0f)"), *CharacterName, Health);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?