Setting texts in UMG from C++

You should create TextBlock in Widgetblueprint and then, bind that TextBlock to your C++ Text Block, the name should be identical. Then you can set its properties in C++.
image
This is the SS of widget BP,
image
This is the SS of the header file where I declared TextBlock, see the name is same. Make sure you use meta in UPROPERTY.


This is the SS of the CPP file of the widget, make sure to use the event PReConstruct and not just simply Construct as PreConstruct will run while constructing the widget and not in Beginplay so you can see the changes in the editor instead of seeing the changes when you play.