UKismetTextLibrary::Conv_StringToText
#include "Kismet/KismetTextLibrary.h"
Access: public
Specifiers: staticBlueprintPureBlueprintAutocast
Description
Converts a string to culture-invariant text. Backs the 'To Text (String)' Blueprint conversion node.
Caveats & Gotchas
- • The resulting text is culture-invariant, meaning it will never be picked up by the localization gathering process — use 'Make Literal Text' instead if the string needs to be translated.
- • For concatenating multiple pieces of already-localized text, prefer FText::Format over converting to string and back, since round-tripping loses the source text's localization data.
Signature
static FText Conv_StringToText(const FString& InString) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InString | const FString& | The string to convert. | — |
Return Type
FText Example
Build a text pin from a runtime string C++
FString PlayerName = TEXT("Player1");
FText NameText = UKismetTextLibrary::Conv_StringToText(PlayerName);
NameTextBlock->SetText(NameText); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?