Modify user created widget's children's variables

Typically, UE5 has been pretty enjoyable to work with. But widgets and UI have been the most painful thing for me. I just cannot figure them out tbh haha.

I tried to create a reusable button widget. Since this button has a hover animation effect, I didn’t want to constantly keep adding additional hover animations. However, to my dismay I cannot change the child text box’s text for each different button? I made it a variable and everything. I’m purely templating right now, so I kind of need to be able to change that without code.

There’s no way to access the child in this case. Is there another way to handle this? I tried to look for solutions online, but there were no solutions that worked for me.

EDIT: I know about named slots, and they can work… but it seems I have to consistently adjust the font and stuff of whatever I put in there so it matches everything else. It’d be nice if I could just plop the reusable button into my scenes, and just change the text.

  • in the reusable button:

  • in the widget hosting reusable buttons:


plop the reusable button into my scenes, and just change the text.

You cannot plop a button into the scene - not on its own. So what exactly are we dealing with then? Is there more to it than the description suggests? Are those widget components attached to actors and you place those actors in the scene?

3 Likes

Alright, thank you SO much. Not sure why I couldn’t figure this out, and my google skills must’ve been lacking.

This saved my life before I got too deep into bad practices.

You cannot plop a button into the scene - not on its own. So what exactly are we dealing with then? Is there more to it than the description suggests? Are those widget components attached to actors and you place those actors in the scene?

I’m sorry, by “scene” I meant the designer. It might’ve been unclear.

2 Likes