The FText function is used to get an FText representation of a string.

Useful when you have to interact with UserWidget-related classes for the UI of your mods, and call their SetText(FText("My New Text")) methods.

Parameters (overload #1)

This overload mimics FText::FText( FString&& InSourceString ).

1stringString that you'd like to get an FText representation of

Return Value

1FTextFText representation of incoming string


local some_text = FText("MyText")

print(some_text) -- MyText