Resource
When to split modules, what types exist, how dependencies work, and how to name them. The stuff that's hard to change later.
Unreal Engine has several module types. Each one loads at a different point in the engine lifecycle and has different constraints on what it can reference.
RuntimeAlwaysYesCore gameplay code, systems that run in shipping buildsRuntimeAndProgramAll targets including standalone programsYesUtility libraries shared between the game, editor, and standalone UE programs like UnrealPakEditorEditor onlyNoCustom editor tools, detail panels, asset factoriesDeveloperToolNon-shipping buildsNoDebug tools, test harnesses, dev cheats. Note: the old Developer type is deprecated since 4.24.UncookedOnlyUncooked editor sessionsNoCustom Blueprint node types (K2Node), editor-only graph systemsProgramStandalone programs onlyDependsCommandlets, automation toolsStart with one Runtime module per project. Split when you have a concrete reason, not preemptively.
Module names are PascalCase with no underscores. The project or plugin name typically appears as a prefix to avoid collisions with engine modules.
MyGameMatches the .uproject name. Created by default.MyGameInventoryProject prefix + feature name.MyGameEditorSuffix with Editor. Contains detail panels, asset factories.SmartAIPlugin name is the module name for single-module plugins.SmartAIEditorSuffix with Editor, same as game modules.MyGameCoreLightweight module for interfaces, structs, and enums that other modules depend on.Module dependencies are declared in .Build.cs files. Dependencies flow in one direction. Circular dependencies between modules won't compile.
PublicDependencyModuleNames when your public headers expose types from the dependency.PrivateDependencyModuleNames when only your .cpp files need the dependency. This is the safer default.PrivateIncludePathModuleNames makes include paths available for forward declarations only. Your .cpp files can't call into that module without a proper dependency entry.Each module has a standard file layout. The module name matches the folder name and the .Build.cs file name.