GenericUMGBuilder is an Unreal Engine 5.4 editor plugin that lets Unreal Python assemble Widget Blueprint layouts through a generic builder API.
This repository contains:
- A sample Unreal Engine project that hosts the plugin
- The editor-only C++ bridge that mutates
WidgetTree - Python examples that generate inventory and hotbar UI layouts
Unreal's official Python API can create Widget Blueprint assets, but it does not expose enough designer-level WidgetTree functionality to build arbitrary UMG layouts directly from Python in Unreal Engine 5.4.
This project fills that gap by exposing a focused set of editor-only C++ functions that Python can call to:
- Create widgets
- Build hierarchies
- Configure slot layout data
- Save, compile, and open generated widget blueprints
The goal is simple: let Python act like the hand assembling the UI while C++ performs the engine-side editor mutations.
Plugins/GenericUMGBuilder/: the plugin source, examples, and plugin READMESource/: the minimal host project moduleConfig/: Unreal project configuration
- Unreal Engine
5.4 Python Editor Script Pluginenabled- A C++ project that can build the editor target
- Clone this repository into a local folder.
- Generate project files if needed.
- Build the
Development Editortarget. - Open the project in Unreal Editor.
- Restart the editor once after the plugin is compiled so the reflected Python API is visible.
In Unreal's Python console, run one of the included examples:
exec(open(r"D:/Path/To/Repo/Plugins/GenericUMGBuilder/Content/Python/Examples/build_inventory_example.py", encoding="utf-8").read())or:
exec(open(r"D:/Path/To/Repo/Plugins/GenericUMGBuilder/Content/Python/Examples/build_hotbar_example.py", encoding="utf-8").read())The generated widget assets are created under /Game/UI.
The builder currently focuses on editor-time UMG authoring for common layout flows. It already supports:
- Core panels such as
CanvasPanel,VerticalBox,HorizontalBox,UniformGridPanel,GridPanel,ScrollBox, andOverlay - Content widgets such as
Border,Button,SizeBox,Image, andTextBlock - Slot and styling helpers for common UMG layout operations
This is intentionally editor-only. It is not a runtime UI generation system for packaged builds.
Contributions are welcome. Start with:
CONTRIBUTING.mdfor contribution flowROADMAP.mdfor near-term prioritiesPlugins/GenericUMGBuilder/README.mdfor plugin-level usage details
This repository is released under the MIT license. See LICENSE.