Why am I getting the “UE4Editor-MyGame.dll is missing from your computer” error on my new computer?
I never had any issues building and launching the game; however, I recently got a new development computer. Now, whenever I get latest, build, and run the game, I get the following error:
The program can’t start because UE4Editor-MyGame.dll is missing from your computer. Try reinstalling the program to fix this problem.
None of my coworkers are experiencing this error, and I had never encountered this error on my old computer. All my development paths are the same between the new and old machine. I am able to successfully launch the game by making the following changes to FModuleDescriptor::LoadModulesForPhase()
:
void FModuleDescriptor::LoadModulesForPhase(ELoadingPhase::Type LoadingPhase, const TArray<FModuleDescriptor>& Modules, TMap<FName, EModuleLoadResult>& ModuleLoadErrors)
{
FScopedSlowTask SlowTask(Modules.Num());
#pragma region DLL Path Hack
// #HACK: Force the module manager to search the game folder for .dlls.
// This directory should already be searched, but Unreal can't find any .dlls in
// this directory without explicitly adding it here.
FModuleManager::Get().AddBinariesDirectory(TEXT("E:\\UE4\\MyGame_Dev\\MyGame\\Binaries\\Win64"), true);
#pragma endregion DLL Path Hack
for(int Idx = 0; Idx < Modules.Num(); Idx++)
{
...
What could be causing this issue? Could it be a missing path variable or registry value? It doesn’t prevent development, but it is disconcerting that, while my coworkers can run the game straight from the depot, I have to modify engine files to run successfully. Any help would be greatly appreciated!
Edit
I did notice this little gem a few lines down:
// @todo plugin: DLL search problems. Plugins that statically depend on other modules within this plugin may not be found? Need to test this.
// NOTE: Loading this module may cause other modules to become loaded, both in the engine or game, or other modules
// that are part of this project or plugin. That's totally fine.
Not sure if the “DLL search problems” could be a computer-specific thing, or if it was ever tested. In any case, if it wasn’t tested, it would appear that they need to be tested.
It looks like that was added by Ben Marsh for CL 2119335 in commit 8d04b79. Not sure if this info helps, but it’s where this function was originally implemented and where it’s failing.