The game module "MyGame" could not be found. Please ensure that the module exists and that it s compiled.

Hi all…

I can run my app just fine in PIE. It runs as Standalone as well. But, when I package the game and get a successful build, when I run it, I get the error specified in the title.

The app is pretty basic. It has the main app, and I’ve added one plugin that created myself. The error is not on the plugin, rather the app…

One thing that came to mind as a possible issue is the fact that I’ve added some custom settings to the DefaultGame.ini file. Then I created a class that is configured to use those new settings… This read only.
Again, everything runs fine in PIE and Standalone… I was wondering if there is some setting that I need to set in the GameSettings to ensure that the DefaultGame.ini gets included with the build.

So, I did some searching and found a post where someone mentioned that all the Default_xxx_.ini files get packaged into the .PAK file? Which if this is the case, I can see that I have put myself into a hole because the .PAK file is binary and not editable.

Anyway, at this point, I don’t think it’s the DefaultGame.ini file at this point… So, I was wondering if anyone might have any insights into what might be causing my app to crash out with that message box error.

“The game module “MyGame” could not be found. Please ensure that the module exists and that it s compiled.”

Thanks for any feedback!!!

PS
One thing I might add is that this is using PixelStreaming. I’ve added the PixelStreaming plugin. I searched but didn’t see anything about it, but, is there some kind of pixel streaming module that needs to be added to the app build.cs file?

Hey @m00nB33r ,

Probably Build Target that you’re trying to package is configurated in a wrong way.


You haven’t mentioned if your project is Blueprint-only or not, but I suspect that one of Target files under…

[project_name]/Source/[target_name].Target.cs

…is just missing the “MyGame” module.
Have you took a look at those files already? If not, give them a try.
If you become stuck, copy paste their content, I’ll try to help.
(more about Target.cs files here: UnrealBuildTool Targets )


If you use said Plugin only in Blueprints, you don’t have to include it in Build.cs file.
And if that was a problem you probably wouldn’t be able to package the Game in the first place.


Hope this may help

Cheers!

Hi dzemzmcdonalda

Both the custom plugin and application are C++ heavy.
Both plugin and app have custom GUI stuff using widgets… No 3d assets in either…

I will double check the target tomorrow when target stuff you are referring to when I come back to work tomorrow…

Thanks for helping out, greatly appreciated!!!

Hey I figured it out… I must have tried to rename this project at some point, don’t recall, but. In the games.cpp file, we have this line of code.

IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, MyApp, "MyApp" );

Parameter 2 and 3 were not the same… Once I made sure the to parameters matched up, I was able to package and run it… Kind of odd in a way, I would have assumed that the Build process would have caught that…

But, anyway, all good now!!!

Thanks for your help dzemzmcdonalda :grinning: