UKismetSystemLibrary::GetClassDisplayName
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the display name of a class, for use as a debugging aid when logging or printing which class an object belongs to.
Caveats & Gotchas
- • Despite the name, this simply returns Class->GetName() — it does not strip the Blueprint-generated "_C" suffix or engine prefix (U/A) the way some editor-only display-name utilities do, so Blueprint classes print as e.g. "BP_Enemy_C".
- • Returns an empty string for a null Class rather than asserting or crashing.
Signature
static FString GetClassDisplayName(const UClass* Class) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Class | const UClass* | The class to get a display name for. | — |
Return Type
FString Example
Log which class an object is C++
FString ClassName = UKismetSystemLibrary::GetClassDisplayName(MyActor->GetClass());
UE_LOG(LogTemp, Log, TEXT("Object class: %s"), *ClassName); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?