I’ve set up a custom GameMode class for my game called ScreenGameMode that uses a custom PlayerController class, and I have it set in “Project Settings → Maps & Modes” as “Default Game Mode.” When I play in the editor it uses ScreenGameMode and my custom PlayerController correctly, but when I package a build, it uses the base GameMode instead and the base PlayerController class. Any ideas why this might be?
There’s no “Game Mode Override” set in “World Settings.” This is the first time I’ve tried to make a packaged build of this project.
I have upgrade this project a few times from older versions of UE4; I saw this question that sounds like possibly the same issue. Maybe I need to recreate my GameMode blueprints? Ugh!
Solved it. It looks like the issue is that if you define a custom GameMode in your settings, and then you move and/or rename that GameMode blueprint, the editor knows where to find the blueprint still but the Config\DefaultEngine.ini config file still points to the old path, which causes packaged builds to fail to load the custom GameMode and fall back on the base class GameMode. The fix was to simply go into “Project Settings → Maps & Modes”, change the “Default Game Mode” to GameMode and then back to my custom ScreenGameMode class. I probably could have also just updated DefaultEngine.ini manually to point it to the new location.
yup, same issue here, just browsed to the defaultengine.ini and confirmed that it is linking to the old file location… either updating that or in the editor fixes it
I can confirm this bug in 4.23. Did you report it ?
I did not work for me, ue4.23
helo me pls what else could go wrong?
I’ve also got this weird error, and I know that I moved the blueprint from the base folder to my blueprints folder, so maybe it’s an error with the redirectors. I went into the ini file, and it was pointing to the blueprint correctly, so I deleted the blueprint and created another one from the base game mode class, but I’m still getting the same error. It’s pointing to the blueprint game mode class I imported as a feature when I had pulled in the start pack content even though the engine default references are to my base class. I’d like to know what else could cause this, so please let us know if anyone finds a solution to this!