Using Widget Style Assets with UMG

Style assets are not really intended to be used with UMG any more. Those styles exist because they were developed before UMG, and are still being used by game teams using raw slate. All styling in UMG is currently done with inlined styling, however that is also temporary.

The long term plan is to make styling reusable, but not the way it was. The plan is to make style classes, that can be extended via blueprints or C++ and contain behaviors, allow bindings…etc. As opposed to what they are now, which are just flat structs with no way to encode behavior or additional data. Even if you could reuse a button’s style right now, it’s still not good enough. if you want all buttons to look a certain way AND scale on hover, you’ve got to duplicate the logic which isn’t good.

I don’t have a timeline for the revamp to styles, but we know it’s a problem and we have a plan to replace them. Won’t be in 4.6, we already have a ton of things lined up for that release.

If you need something to be reused a lot, I recommend making the widget a user control that’s just a button or whatever so that you can reuse the style and behavior information. In 4.6 Named slots will make it way easier to re-use user controls by allowing you to expose slotable areas on user controls so that you don’t have to bake out a button that already has text, or an image. You just make a user control that’s a button with a slot.

Cheers,
Nick