Common pitfalls
Modding UI can be quite complicated, and you may run into crashes. Here are several of the common pitfalls I've personally run into, and how they can be avoided.
- If the game crashes upon loading the UI element, there is a very good chance that you deleted a part of the widget. Never delete parts of the widget, as the game may try to reference it. Even something as innocuous as a text box could crash the game if it was missing. Instead, set its visibility to Collapsed.
- (Strive/DNF) If your UI elements don't appear in-game, you most likely did not package the Allset widget. In earlier versions of Unreal Engine, the widget hierarchy is "baked" into every widget, and only the directly created widget has its hierarchy referenced. This means that all of your changes to the child widget will be disregarded unless you also package the Allset widget.
- Some widgets may also contain Blueprint code. If this code is not properly replicated, the game may act unpredictably. Replicating this code deserves a section of its own, but I will leave you with the primary tool I use to replicate blueprint code: kismet-analyzer by trumank.
- If parts of a widget show up as pure black in the editor, they probably use a material. The material can be found under the Details panel for the UI element. The autogenerated materials are broken by default for UI elements, but they likely contain a texture that can be used to preview the material. You'll know if it's the right one because it will resemble the UI element in-game. Simply plug that texture into Final Color, and its alpha channel into Opacity and Opacity Mask.