Get blueprint return value ?

Hi guys, I can not decide how to get the return value from the blueprints to C++ ?
I want to get the text from UMG TextBox and place it in a cpp variable.
Thank you for helping.

lets say your custom HUD class is written in C++, and contains the (BlueprintReadWrite) String variable which you want to set. then a blueprint inheriting from that HUD class spawns a UMG widget with a TextBox, and stores a reference of that widget in a variable.

inside your Blueprint HUD class, you could get that widget reference, get the string from the text box, and use it to set the native HUD variable.

if your native class is not the parent of the BP class that spawns the widget, communicating that data may get more complicated.