ue-module-and-build-system

Configure Unreal Engine C++ modules, Build.cs dependencies, and Target.cs build targets.

55|5|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-module-and-build-system-kevinpbuckley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ue-module-and-build-system
Source: https://github.com/kevinpbuckley/unreal-engine-skills/tree/main/skills/core/ue-module-and-build-system
Command: npx skills add https://github.com/kevinpbuckley/unreal-engine-skills --skill ue-module-and-build-system-kevinpbuckley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Unreal C++ code fails to compile or link when modules are structured incorrectly: missing dependencies cause "cannot open include file" errors, missing MYGAME_API macros cause unresolved external symbols, and wrong loading phases cause "module not found" at startup. This Skill provides the correct patterns for structuring modules and configuring UnrealBuildTool so these errors are diagnosed and fixed at the source. ## Core Features & Use Cases - Module structure and registration: Create new modules with the correct Public//Private/ layout, IMPLEMENT_MODULE / IMPLEMENT_PRIMARY_GAME_MODULE macros, and IModuleInterface startup/shutdown hooks. - Build.cs and Target.cs configuration: Choose public vs private dependencies, set PCH/IWYU modes, gate editor-only dependencies, integrate third-party libraries, and define Game/Editor/Server targets. - Link error diagnosis: Map unresolved external symbols, include failures, and circular dependencies to their root cause in module configuration. - Use Case: You used UEnhancedInputComponent and the build fails with unresolved externals. The Skill tells you to add "EnhancedInput" to PrivateDependencyModuleNames in your Build.cs and regenerate project files. ## Quick Start Ask the agent to create a new Unreal C++ module named MyGameplay with the correct Build.cs, module registration, and .uproject entry.

Frequently Asked Questions about ue-module-and-build-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix unresolved external symbol errors in Unreal C++?

Unresolved external symbols usually mean a missing MODULE_API macro on a class used by another module, or a missing entry in your Build.cs dependency lists. Add the owning module to PublicDependencyModuleNames or PrivateDependencyModuleNames and export the class with its API macro.

How do I create a new module in an Unreal Engine project?

Create a Source/<Name>/ folder with Public and Private subdirectories, add a <Name>.Build.cs inheriting ModuleRules, add a .cpp with IMPLEMENT_MODULE, and register the module in the .uproject Modules array. Then regenerate project files before building.

What is the difference between PublicDependencyModuleNames and PrivateDependencyModuleNames?

Use PublicDependencyModuleNames when a dependency's types appear in your public headers, so consumers inherit the include. Use PrivateDependencyModuleNames when types are only used in .cpp files or private headers, keeping builds faster and the API surface lean.

Why does Unreal say cannot open include file when the header exists?

This happens when the module owning that header is not listed in your Build.cs dependencies, even though the file exists on disk. Add the owning module to your dependency list and regenerate project files.

When should I use PreDefault loading phase for an Unreal module?

Use PreDefault when your plugin module provides base types or factories that Default-phase modules depend on, such as when the editor reports class not found for your plugin. Most gameplay code should stay at the Default phase.

Does changing Build.cs require regenerating Unreal project files?

Yes. UBT reads only Build.cs and Target.cs files, ignoring the IDE solution, so adding, moving, or renaming source files or changing dependencies requires regenerating project files before building. A Live Coding reload is not sufficient.