RealDocs

UKismetTextLibrary::Conv_ObjectToText

function Engine Blueprint Since unknown
#include "Kismet/KismetTextLibrary.h"
Access: public Specifiers: staticBlueprintPureBlueprintAutocast

Description

Converts a UObject reference to culture-invariant text by calling the object's GetName(). Backs the 'To Text (Object)' Blueprint conversion node.

Caveats & Gotchas

  • Returns the object's internal GetName(), not a display-friendly label — for actors this is often an auto-generated name like 'StaticMeshActor_3' rather than anything set in the editor.
  • Passing a null object returns text for 'None' rather than triggering an error, so an upstream null check is still needed if that distinction matters to your logic.

Signature

static FText Conv_ObjectToText(class UObject* InObj)

Parameters

Name Type Description Default
InObj UObject* The object to convert.

Return Type

FText

Example

Show a referenced object's name in the UI C++
UObject* TargetObject = GetSelectedObject();
FText NameText = UKismetTextLibrary::Conv_ObjectToText(TargetObject);
NameTextBlock->SetText(NameText);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.