RealDocs

UKismetStringLibrary::BuildString_Object

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

Description

Builds a new string in the form AppendTo+Prefix+object name+Suffix, inserting the object's name between the prefix and suffix.

Caveats & Gotchas

  • Passing a null InObj inserts the literal string "None" rather than crashing or returning an empty string.
  • Uses the object's short GetName(), not GetPathName(), so two objects sharing a name under different outers are indistinguishable in the output.

Signature

static FString BuildString_Object(const FString& AppendTo, const FString& Prefix, class UObject* InObj, const FString& Suffix)

Parameters

Name Type Description Default
AppendTo const FString& An existing string to use as the start of the result.
Prefix const FString& A string inserted after AppendTo and before the object's name.
InObj class UObject* The object whose name is inserted into the result.
Suffix const FString& A string appended to the end of the result.

Return Type

FString

Example

Label a debug string with an actor's name C++
FString DebugText = UKismetStringLibrary::BuildString_Object(TEXT(""), TEXT("Hit: "), HitActor, TEXT(""));

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.