Hi! I know my version is a little old, I have been working on it on it on and off over the past year or 2 whenever I have free time.
I really need help accessing a variable from a widget blueprint, within an actor blueprint. I have read other somewhat similar articles but I just cant seem to grasp the responses, sorry maybe I’m just dense…
In my widget Blueprint I have a simple Boolean variable that is set true or false with a button and a flipflop:
In an actor blueprint with a simple cube mesh, I have an “Event Actor Clicked” connected to a branch, and its condition is the boolean from the Widget BP that I flip on and off.
Get All Widgets of Class function is one way to do it. Show your widget as widget class and then Get(Copy) from found widgets, finally get/set any variable you like. Or you can(actually you should) get a reference of that widget in the BP you are creating it in, then set/get whatever variable you like through there.
Sorry, forgot you were on 4.14. Newer versions have two types of "Get"s.
Also, even though this system works the best practice is getting a reference of the widget when you create it as i and dabs863 suggested. What you need to do is this:
Lets say you are creating the widget in your Player controller. When you create the widget pull the blue out pin and promote it to a variable. That will be the reference you’ll use whenever you need to get/set a variable from that widget. This is especially better than get all widgets of class when there are multiple instances of the same widget but you dont know which is which.