Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Unreal Modules Build?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tipoli5890-unreal-modules-build)
---
name: unreal-modules-build
description: >-
Unreal modules: Build.cs dependencies, Target.cs, module types and loading phases, .uplugin,
IMPLEMENT_MODULE; unresolved externals, a missing module.
---
# unreal-modules-build — modules, targets and plugins, as files
Every link error that names a missing symbol, and every class the editor cannot find, comes back to a
module: its rules file, its descriptor entry, or its implementation macro. These are text files, so
they can be checked before the build tool ever runs.
## Load what the situation needs
| The situation | Read |
|---|---|
| Adding a dependency; public or private; which module a header is in | `reference/build-cs.md` |
| A target file: types, `ExtraModuleNames`, settings the engine generated, a shared build environment violated | `reference/target-cs.md` |
| `.uproject` and `.uplugin` module entries, types, loading phases, enabling a plugin | `reference/descriptors.md` |
| "cannot open include file", "unresolved external symbol", "undefined symbol" | `reference/link-errors.md`; `scripts/module_graph.py classify` |
| Adding a module or a project plugin | *Add a module* below; `templates/` |
| Checking a project's descriptors, folders, rules files and includes | *Check before you build*; `scripts/module_graph.py check` |
| Running the build itself | `unreal-compile-loop` |
| Reading the project first: engine, descriptor, what exists | `unreal-project` |
| The module API macro on a class, `.generated.h`, specifiers | `unreal-cpp-reflection` |
## The files of one project
```
CourierRun/
CourierRun.uproject Modules: CourierRun (Runtime), CourierRunEditor (Editor)
Plugins: { "Name": "ParcelTools", "Enabled": true }
Source/
CourierRun.Target.cs Type = TargetType.Game; ExtraModuleNames: CourierRun
CourierRunEditor.Target.cs Type = TargetType.Editor; ExtraModuleNames: CourierRun, CourierRunEditor
CourierRun/CourierRun.Build.cs Public/ (headers other modules include), Private/ (the rest, all .cpp)
CourierRunEditor/CourierRunEditor.Build.cs, Private/CourierRunEditorModule.cpp
Plugins/ParcelTools/ParcelTools.uplugin, Source/ParcelTools/ParcelTools.Build.cs, Private/ParcelToolsModule.cpp
```
The templates are these files: `CourierRun.Build.cs`, `CourierRunEditor.Build.cs`,
`CourierRunEditorModule.cpp`, `CourierRun.Target.cs`, `CourierRunEditor.Target.cs`,
`ParcelTools.uplugin`, `ParcelTools.Build.cs`, `ParcelToolsModule.cpp`. Each says where it goes in its
first line. The `.uproject` is `unreal-project`'s template. The game module's own `.cpp` is the one the
engine generated with the project: it holds `IMPLEMENT_PRIMARY_GAME_MODULE`, and that line stays as
generated. Target files merge into the generated ones, which keep their `DefaultBuildSettings` and
`IncludeOrderVersion` lines (`reference/target-cs.md` §2).
## Add a module
1. Make `Source/<Module>/` with `<Module>.Build.cs`: `public class <Module> : ModuleRules`, and the
class name is the module name. Add empty `Public/` and `Private/` folders.
2. In `Private/`, one `.cpp` with `#include "Modules/ModuleManager.h"` and, after all includes,
`IMPLEMENT_MODULE(FDefaultModuleImpl, <Module>);`.
3. Add a descriptor entry: `{ "Name": "<Module>", "Type": "Runtime" or "Editor", "LoadingPhase": "Default" }`.
It goes in the `.uproject`, or in the plugin's `.uplugin` for a plugin module.
4. Add it to `ExtraModuleNames` in each target that should contain it. An editor module goes only in
the editor target.
5. List it in the Build.cs of each module that uses it. Classes those modules use carry `<MODULE>_API`.
6. Run `scripts/module_graph.py check`, regenerate the project files, then build
(`unreal-compile-loop` → `reference/build-commands.md`).
A project plugin is the same with one more file: `Plugins/<Plugin>/<Plugin>.uplugin` lists the module,
and the `.uproject` enables the plugin. An engine plugin is enabled in the `.uproject` by its
`.uplugin` name, and its module is listed in Build.cs (`reference/descriptors.md` §3).
## Public, private, editor
| The dependency's types appear in... | List it in |
|---|---|
| a `Public/` header of this module | `PublicDependencyModuleNames` |
| only `.cpp` files and `Private/` headers | `PrivateDependencyModuleNames` (prefer this) |
| a runtime module, but only for the editor | inside `if (Target.Type == TargetType.Editor)`; better, in an editor module |
`UnrealEd`, and any module of `"Type": "Editor"`, never reaches a Game target. A runtime module that
lists one unguarded builds in the editor and fails in a package.
## Check before you build
```bash
python3 scripts/module_graph.py check CourierRun # a .uproject, or its folder
python3 scripts/module_graph.py classify Saved/build.log --project CourierRun
python3 scripts/module_graph.py --selftest
```
`check` reads the `.uproject`, every `.uplugin`, Build.cs and Target.cs file, and the quoted includes
of each module. It fails when:
- a descriptor module has no folder and Build.cs, or a `Type` or `LoadingPhase` is misspelt;
- a rules class does not carry its file's name;
- `ExtraModuleNames` names a module that does not exist;
- a runtime module or a Game target pulls in an editor module;
- an include comes from a module the Build.cs does not list, or from another module's `Private/`;
- project modules form a cycle;
- a module has no implementation macro, or the project has no primary game module.
It warns on a Build.cs no descriptor lists, a `Public/` header that needs a private-only module, a
project plugin that is not enabled, a cycle kept by `CircularlyReferencedDependentModules`, and older
descriptor key spellings. It notes engine-plugin modules and dependency names outside its engine
table, which is a small subset: it reports an unknown name and never guesses one. `classify` maps
each error line of a log to a module, a macro or a missing body (`reference/link-errors.md`). Exit 0
clean, 2 a FAIL (or error lines classified), 3 nothing read, 1 usage.
## Classic failures
| What you see | Cause | Fix |
|---|---|---|
| Cannot open `EnhancedInputComponent.h` | its module is not in Build.cs, and its plugin may not be enabled | `EnhancedInput` in Build.cs; the plugin in the `.uproject` |
| Unresolved external symbol for an engine class's function | the class's module is not linked | add the module the API page names |
| Unresolved external for a class in another project module | no `<MODULE>_API` on the class, or the module is not listed | export it; list the module |
| Unresolved `<Name>_Implementation` | a native event or RPC body is missing | define it in the `.cpp` |
| The editor cannot load a module at start-up | a descriptor names a module that is not built, or a name and folder disagree | `module_graph.py check` |
| A plugin's classes are missing in the editor | the plugin is not enabled, or its module loads too late | enable it; `"LoadingPhase": "PreDefault"` |
| A package fails on `UnrealEd` | a runtime module lists an editor module unguarded | guard it, or move the code to `CourierRunEditor` |
| The editor target is refused for changing the shared build environment | a setting in Target.cs that the shared environment fixes, such as a definition | `reference/target-cs.md` §3 |
| Two modules each need the other | a dependency cycle | move the shared types down (`reference/build-cs.md` §5) |
## Related skills
- `unreal-compile-loop` → `reference/reading-errors.md`: running the build and finding the first error.
- `unreal-cpp-reflection` → `reference/specifiers.md`: `MinimalAPI` and the reflected side of exports.
- `unreal-project` → `reference/project-layout.md`: the descriptor's other keys and the project tree.
- `unreal-packaging` → `reference/buildcookrun.md`: where editor-only dependencies finally fail.