Skip to content

Repository files navigation

BP_DocGen

A documentation generator that produces an Obsidian vault from an Unreal Engine project. It scans C++ source, Blueprint assets, config files, and plugin metadata, then generates interlinked Markdown pages with [[wiki-links]].

Output

The generated vault includes:

  • Blueprint pages — variables, functions, components, events, referenced assets
  • C++ class/struct/enum pages — UPROPERTY, UFUNCTION details with doc comments
  • Config pages — all INI sections and keys
  • Plugin & Module pages — dependencies, author info
  • Project overview
  • Index pages — Dashboard, All Blueprints, All Classes, All Configs, All Plugins, Class Hierarchy

Prerequisites

Installation

Automated Setup

Windows:

setup.bat

Linux / macOS:

./setup.sh

The setup script will:

  1. Clone UAssetAPI into src/lib/UAssetAPI/
  2. Build the C# UAssetExporter tool
  3. Install the Python package in editable mode

Manual Setup

# Clone UAssetAPI dependency
git clone https://github.com/atenfyr/UAssetAPI.git src/lib/UAssetAPI

# Build the C# UAssetExporter
dotnet build src/UAssetExporter -c Release

# Install Python package
pip install -e .

Usage

bp-docgen <path-to-unreal-project> -o <output-directory>

Or run directly as a module:

python -m bp_docgen.cli <path-to-unreal-project> -o <output-directory>

Options

Flag Description Default
-o, --output Output directory for the vault <project_root>_docs/
--ue-version Engine version hint (e.g. UE5_4, UE5_5, UE4_27) UE5_4
--exporter Path to UAssetExporter binary Auto-detected
--no-blueprints Skip Blueprint .uasset scanning
--no-cpp Skip C++ source scanning
--no-configs Skip config .ini scanning

Example

bp-docgen "C:/Projects/MyGame" -o "C:/Obsidian/MyVault/Code Docs" --ue-version UE5_5

Project Structure

BP_DocGen/
├── src/
│   ├── bp_docgen/              # Python package
│   │   ├── cli.py             # CLI entry point
│   │   ├── config.py          # Configuration
│   │   ├── model/             # Data model & cross-reference registry
│   │   ├── rendering/         # Markdown generation & Jinja2 templates
│   │   └── scanning/          # UE project scanners (C++, Blueprints, configs)
│   ├── UAssetExporter/         # C# tool for parsing .uasset files
│   └── lib/UAssetAPI/          # Third-party UAsset parsing library (cloned during setup)
├── pyproject.toml
├── requirements.txt
├── setup.bat / setup.sh
└── BP_DocGen.sln

GUI Usage

BP_DocGen includes a graphical interface for users who prefer not to use the command line.

Launching the GUI

bp-docgen-gui

Or run directly as a module:

python -m bp_docgen.gui

Interface

The GUI provides the following fields:

Field Description
Project Directory Browse to your Unreal Engine project folder (the one containing the .uproject file). Required.
Output Directory Where to write the Obsidian vault. Leave blank to use the default (<project>_docs/ next to your project).
UE Version Dropdown to select your engine version (UE4_27 through UE5_5).
UAssetExporter Path Only needed if the exporter wasn't built in the standard location. Leave blank for auto-detection.
Scanners Checkboxes to toggle Blueprint, C++ source, and config file scanning. All enabled by default.

Click Generate Documentation to start. Progress and results appear in the output log at the bottom of the window.


PowerShell Script (Automation / Scheduled Jobs)

The included generate-docs.ps1 script is a template for automated or scheduled documentation generation. This is useful if you want to regenerate docs on a schedule (e.g., via Windows Task Scheduler) or as part of a build pipeline.

Setup

Copy the script and edit the variables at the top to match your environment:

# generate-docs.ps1

$ProjectRoot = "C:\path\to\YourGame"
$OutputDir   = "C:\path\to\output\vault"
$UEVersion   = "UE5_5"
$BPDocGenDir = "C:\path\to\BP_DocGen"

$env:PYTHONPATH = "$BPDocGenDir\src"
python -m bp_docgen.cli "$ProjectRoot" -o "$OutputDir" --ue-version $UEVersion

Running Manually

.\generate-docs.ps1

Scheduling with Windows Task Scheduler

  1. Open Task Scheduler and create a new task
  2. Set the trigger (e.g., daily, on commit, on login)
  3. Set the action:
    • Program: powershell.exe
    • Arguments: -ExecutionPolicy Bypass -File "C:\path\to\BP_DocGen\generate-docs.ps1"
  4. Ensure the task runs with a user that has access to the project and output directories

You can add additional CLI flags (like --no-blueprints) directly to the python command in the script.


How It Works

  1. Scan — Gathers information from C++ headers, .ini configs, .uproject/.uplugin files, and Blueprint .uasset binaries (via the C# UAssetExporter)
  2. Resolve — Cross-references between nodes are resolved (e.g. Blueprint inherits from C++ class)
  3. Render — Markdown pages are generated using Jinja2 templates with Obsidian wiki-link syntax

License

All rights reserved.

About

Generate Obsidian vault documentation from Unreal Engine projects

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages