d44fabb4e4448765a4172624f5a5c18eaa270dec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
UnrealDocGenerator
Generates compact, agent-readable Markdown documentation from Unreal Engine C++ header files, plus a Claude Code skill for querying it.
How it works
- Parse —
ue_parser.pyscans UE headers into dataclasses using a position-based scanner (handles nested braces, macros, delegates, namespaces). - Render —
ue_markdown.pyemits one.mdper header: only items with C++ doc comments, no deprecated functions, compact enum format. - Index —
generate.pyproducestype-index.txt: a flatTypeName: path/to/File.mdlookup for instant type resolution.
Usage
python generate.py <input> <output_dir>
# Examples
python generate.py /path/to/UnrealEngine/Engine/Source/ docs/
python generate.py samples/AIController.h docs/
Output: one .md per .h + docs/type-index.txt.
Querying the docs (Claude Code skill)
The repo includes a Claude Code skill at .claude/skills/ue-api/ that answers Unreal Engine API questions using the generated docs, falling back to source headers when needed.
Set two environment variables before starting Claude Code:
export UE_DOCS_PATH=/path/to/your/generated/docs
export UE_ENGINE_ROOT=/path/to/UnrealEngine # optional, for source fallback
The skill triggers automatically on UE-related questions. It resolves types via $UE_DOCS_PATH/type-index.txt in a single grep, reads the relevant .md files, and escalates to source headers for undocumented members, macros, or implementation details.
Example lookup:
grep "^AController:" "$UE_DOCS_PATH/type-index.txt"
# → AController: Engine/Classes/GameFramework/Controller.md
Samples
Three representative UE headers in samples/ for testing:
| File | Size | Contents |
|---|---|---|
GeomUtils.h |
~6 KB | Free functions in UE::AI namespace |
AIController.h |
~22 KB | AAIController with movement, BT, perception |
GameplayTagsManager.h |
~43 KB | UGameplayTagsManager singleton, delegates, enums |
Output format
- Functions:
##### `Name(params)` → `ReturnType` *(flags)* - Properties:
- \name` `type` (flags) — description` - Enums: table when values have descriptions, inline
Values: A, B, Cotherwise - Inheritance:
*Inherits*: [BaseClass](relative/path.md)with corpus links
Description
Languages
Python
100%