Universal UMG widget parent for reuse - default variables preview?

Since we can’t use Styles (to e.g. easily change something in all our buttons) anymore, the only way is to create a “parent” widget and reuse it (if I’m not mistaken).
I want to create a “Button_Style1”, “Button_Style2”, etc. parent widgets to reuse them and be able to change e.g. their text color of all buttons using this “style” easily. So I’ve created a “textOnButton” variable and assigned it to the button’s text. But when changing this value, it doesn’t update in UMG editor:


It works in game (button shows “Custom text!”), but it would be really nice to have preview of default values in UMG editor. Is there a way to do it?

Bumpy bump, how do you guys manage your UMG ‘styles’? Is there a better way that i’m missing? Because lack of preview of parent-widget values overriden in child widget makes it hard to visualise UMG design in editor.

It’s been a while… Any tips? :slight_smile: I’m sure that there must be a way to have re-usable button styles and that’s the only approach I’ve found. But is there really no preview of default values, or it’s me doing something wrong?

I guess not, seems like widgets don’t call event on construct in editor and dont trigger any functions as well, which is reasonable.

Yep, im having the same issue it made me sad when i discovered it but UMG is really good overall so im still happy and waiting for improvements in the next versions.

Wouldn’t this be possible via a Slate Brush or Widget Style?

We can’t use it anymore :frowning: More info here: Using Widget Style Assets with UMG - UE4 AnswerHub

A few months later, using 4.11. I am still encountering this issue. I created a variable on my User Widget and bound it to the Text field of the Text widget in the custom widget.

Works fine when I view it in game, but no preview in the editor. Any idea when this will be fixed, or if I am doing something wrong?

Yeah, designing an UI without widget values preview is quite cumbersome, the only thing we can do for now is start the game every time we change something to see how it looks with correct text values…
… And if it’s a submenu or something else deep nested, then we need to go through all the menu levels first before we can see it. It’s hard to believe that this is the intended workflow, are we missing something?

I followed this guide as a workaround:

It really sucks that all my custom widgets have to have code to update their UMG components on that event, but it at least makes it work for now…

Thanks, that seems like a cool workaround. Still needs to setup all these C++ and OnConstruct logic though, so I really hope that Epic will implement something like this ‘DesignableUserWidget’ out of the box.
Hmm, maybe we should make this a feature request… But I can’t move my thread to ‘Feedback for Epic’, so maybe some mod will help? ^^

So in the end due to the original response I ended up coding my own style solution, making a blueprintable class for each control type and having most of the same data as the old styles in there. I then had to extend each of the UWidget classes for the ones I cared about (UButton, UTextBlock etc) and allow them to have a TSubClass of the correct style class, and then wrote some code to take that and apply it to the underlying Slate Widget.

I also made it that any changes to the actual properties on the UButton (Etc) would override the style for that property only. A bit of extra grunt work, but did what we needed it to do.