C++variable inside blueprint

Yes it is possible.

You need to add UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Display) to your variable in c++.
I suppose that the you know what to do next. (Reparent widget to C++ class, bind variable to text field etc.)


I found several links. I hope they help you.

Hello…How can i call a c++ variable inside a blueprint…I have created a widget blueprint and i have to display a variable value in a text block inside that blueprint…The variable is obtained from c++…Is it possible…? Please help…

Actually I have done that…The problem is i cannot change the text…the game crashes…

I’m using this approach and never had any problems with setting variables value. Maybe you should put some breakpoints in visual studio and trace exactly on which line it crashes?