I have a UUserWidget derived base class. I create one in the editor, add a panel, and add some TextBlock and Button widgets. I want to keep track of an array of “important” widgets among these TextBlocks and Buttons.
But of course, like everything, this resulted in a headache. That array is visible in the base’s properties, but I can’t assign anything to it. I add an element and try to assign the asset, but none of the TextBlocks or Buttons show up.
That’s for storing a reference to a class, not the widget object itself.
I’m having this issue too (4.21). If I use a TArray, I can set elements but they’re wiped when the widget is compiled. If I just use pointers, I can’t set them at all.
The only solution I’ve found is to use GetWidgetFromName but this significantly hampers reusability.