Programmatically change text of UMG text Label

Is there a way to programmatically change the text of a UMG Label?

Say for, example I construct a UMG interface using the Unreal Editor, what is the way in which you would programmatically access and modify a Text Label inside of it, for example?

You can’t. Program will crash. It’s illegal.

Hi Wills,

You may be able to accomplish this by adding a variable to your UMG widget and some blueprint logic to update the text field to match this variable. You could then access the variable from C++ using the FindField function.

However, the expected approach is for blueprints to expose C++ functionality, not vice versa. Therefore, a good way of handling this would be to write a function in C++ that returns the string you’d like to set to your text label. You can then call this function from within your widget blueprint to update the value.

Cheers,
Cody