How to access widget variables UMG

So I created a menu widgetA, which on construction will create another bunch of widgetsN and grabbing data from a class.

Inside the new widgedsN I need access to variables I created in widgetA, the only way I found to do so is to pass the variables each time I create widgetN, basically making a copy of the variable every time, or storing it all in some Data class that I can get access to.

Is there a way to access the variables from widgetA directly instead of having to make copies every time?


You could make a reference variable to your “widgetA” inside your “widgetN” and pass widgetA when you create the widgetN. Then you could just access widgetA over the reference.

Like this you only need to pass one value instead of every variable you want to access (:

something I did not think about, thanks! :smiley: