Skip to content

Repository files navigation

Generic UMG Builder for Unreal Engine

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

Why This Exists

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.

Repository Layout

  • Plugins/GenericUMGBuilder/: the plugin source, examples, and plugin README
  • Source/: the minimal host project module
  • Config/: Unreal project configuration

Requirements

  • Unreal Engine 5.4
  • Python Editor Script Plugin enabled
  • A C++ project that can build the editor target

Quick Start

  1. Clone this repository into a local folder.
  2. Generate project files if needed.
  3. Build the Development Editor target.
  4. Open the project in Unreal Editor.
  5. Restart the editor once after the plugin is compiled so the reflected Python API is visible.

Run An Example

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.

Current Scope

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, and Overlay
  • Content widgets such as Border, Button, SizeBox, Image, and TextBlock
  • 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.

Contributing

Contributions are welcome. Start with:

  • CONTRIBUTING.md for contribution flow
  • ROADMAP.md for near-term priorities
  • Plugins/GenericUMGBuilder/README.md for plugin-level usage details

License

This repository is released under the MIT license. See LICENSE.

About

Unreal Engine 5.4 sample project for the GenericUMGBuilder plugin, enabling Python-driven UMG Widget Blueprint generation.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages