Quick answer: Windows could not load your project's editor DLL. Usually it was never built (or only built as DebugGame), a third-party DLL it depends on is missing, or the module name in the .uproject, Build.cs and IMPLEMENT_PRIMARY_GAME_MODULE no longer match. The editor log names the DLL and often the missing import, so start there.
You open a project, often right after cloning it, upgrading the engine or adding a library, and instead of the editor you get this dialog. The message is vague because the engine only knows that Windows refused to load the DLL. The log usually knows why.
- The exact error
- Cause 1: the editor DLL does not exist
- Cause 2: a dependency DLL is missing
- Cause 3: the module name no longer matches
- Cause 4: the module crashes while loading
- Cause 5: something deleted or blocked the DLL
- When the module loads but fails for players
- Related problems
- Frequently asked questions
The exact error
The game module 'MyGame' could not be loaded. There may be an operating system error or the module may not be properly set up.
Open Saved/Logs/MyGame.log in your project folder (the newest file) and search for LogWindows and LogModuleManager. Lines like these point at the cause:
LogWindows: Failed to load 'D:/Projects/MyGame/Binaries/Win64/UnrealEditor-MyGame.dll' (GetLastError=126)
LogWindows: Missing import: steam_api64.dll
Error 126 means the DLL or one of its dependencies was not found. Error 1114 means a DLL's initialization routine failed, which usually points at a crash in a static initializer.
Cause 1: the editor DLL does not exist
Look in Binaries/Win64 for UnrealEditor-MyGame.dll. If it is not there, the module was never built for the editor. Common reasons:
- You cloned a repository that (correctly) does not commit
Binaries, and the “rebuild now?” prompt was declined or failed. - You only built DebugGame Editor, which produces
UnrealEditor-MyGame-Win64-DebugGame.dll. Launching from the .uproject or Epic launcher loads the Development Editor DLL. - The build failed silently in the background.
Fix: right-click the .uproject, Generate Visual Studio project files, open the solution, select Development Editor | Win64, build, and launch from the IDE so you see compile errors directly.
Cause 2: a dependency DLL is missing
If the log shows Missing import, your module links against a library whose DLL is not next to it or on the search path. Third-party SDKs (Steamworks, FMOD, analytics, hardware SDKs) are the usual suspects. Stage the DLL from your module's Build.cs so it is copied to the binaries folder and into packaged builds:
// MyGame.Build.cs
string LibDir = Path.Combine(ModuleDirectory, "..\\..\\ThirdParty\\Foo\\Win64");
PublicAdditionalLibraries.Add(Path.Combine(LibDir, "foo.lib"));
PublicDelayLoadDLLs.Add("foo.dll");
RuntimeDependencies.Add("$(TargetOutputDir)/foo.dll", Path.Combine(LibDir, "foo.dll"));
When the log does not name the import, open the module DLL in Dependencies, a free tool that shows which imported DLLs Windows cannot resolve.
Cause 3: the module name no longer matches
Renaming a project, copying a template or merging branches can leave these out of sync. All four must use the same module name:
- The
"Modules"entry inMyGame.uproject:"Name": "MyGame" - The folder
Source/MyGameand the fileMyGame.Build.cswithpublic class MyGame : ModuleRules - The module implementation:
IMPLEMENT_PRIMARY_GAME_MODULE(FDefaultGameModuleImpl, MyGame, "MyGame"); ExtraModuleNames.Add("MyGame");in bothMyGame.Target.csandMyGameEditor.Target.cs
After fixing them, delete Binaries and Intermediate, regenerate project files and rebuild.
Cause 4: the module crashes while loading
If the DLL exists and has no missing imports, code that runs at load time may be failing: a global or static object whose constructor touches an engine system that is not ready yet, a StartupModule() that dereferences null, or an exception in a third-party library's init. Launch the editor from the IDE with the debugger attached (Development Editor, F5) and it will stop at the failing line.
Cause 5: something deleted or blocked the DLL
Antivirus software sometimes quarantines freshly linked DLLs, especially ones that load other DLLs at runtime. If the file disappears right after a build, check your antivirus history and add an exclusion for the project and engine folders. Cloud-synced folders (OneDrive, Dropbox) can also lock or replace files mid-build; keep projects on a local, non-synced path.
When the module loads but fails for players
The same class of problem, a DLL that is present on your machine and absent on theirs, also happens in shipped games, where there is no dialog and no log you can read. Bugnet's Unreal SDK reports fatal errors and ensures from packaged builds with recent log lines attached, so a missing runtime dependency shows up as a grouped issue with the exact log line, not as “game won't start” in your reviews.
Related problems
- How to Fix “The following modules are missing or built with a different engine version” in Unreal
- How to Fix “Plugin 'X' failed to load because module 'X' could not be found” in Unreal
- How to Fix “Project could not be compiled. Try rebuilding from source manually” in Unreal
Frequently asked questions
What causes “The game module could not be loaded” in Unreal?
Windows could not load the project’s editor DLL. The DLL was not built, a dependency DLL is missing, the module name is inconsistent across the .uproject and source files, or code crashes while the module loads.
Where do I find the real reason the module failed to load?
In the newest log in the project’s Saved/Logs folder. Search for LogWindows lines with GetLastError and Missing import.
What does GetLastError=126 mean when loading an Unreal module?
Windows could not find the DLL or one of the DLLs it depends on. Look for a Missing import line or open the DLL in the Dependencies tool.
Read Saved/Logs before you reinstall anything. The missing DLL is usually named right there.