amal raj
amal raj

Reputation: 1

How to change value of text in a widget blueprint from c++

How to change value of text in a widget blueprint from c++ in Unreal Engine?

Upvotes: 0

Views: 2080

Answers (1)

Stolous
Stolous

Reputation: 19

First, create a class in C++, then set your blueprint's parent class to this class.
create an FString in your class and add: UPROPERTY(Category = UserInterface, EditAnywhere, BlueprintReadWrite) to it. In the blueprint, bind this variable to whatever text you what to change.

Then all you you have to do is update the variable from C++, and it will automatically change the text in your UI.

Upvotes: 1

Related Questions