GameMode Override is being Ignored when Travelling

Hey,

So I’m not sure if this is just me not understanding the flow of UE4 correctly, or an actual issue, but I am having a problem with getting my game to load the GameMode override that is set in my level to load.

I have cooked my content, including the level, multiple times, to make sure it wasn’t an issue with that, and have been searching through the engine code to figure out what is happening.

In UWorld::SetGameMode(const FURL& InURL), the GameClass in the line

UClass* GameClass = Settings->DefaultGameMode;

the GameClass variable is always being set to NULL, causing the engine to load the DefaultGameMode that is set in the DefaultEngine.ini.

All of the other maps within this project load the correct GameMode, it just seems to be this one map for some reason.

Swapped out the FString being used to travel to the level with another level within my project. It loads the correct GameMode for that level. It just seems to be this one level that isn’t working…

Few hours of testing later.

Switching the GameMode of the level to a different one from the project loads the GameMode correctly. The current, non-working GameMode doesn’t work in a build no matter which level it is used in, but does work in the Editor.

There was a warning in the cook logs about being unable to find the Parent for the Blueprinted GameMode. For some reason, when using UnrealFrontend, the cooker cannot find the parent classes, however if I Cook Content For Windows from within Development Editor, it finds it fine. This isn’t really an “answer” so to speak, but it is a temporary solution.

After you cook content from within Development Editor, it seems to work within UnrealFrontend up until I modify the classes that it couldn’t find in anyway, at which point it returns to being unable to find the Parents.

Have you double-checked under Class Defaults of the blueprint that the parent class is set to the base GameMode blueprint?

Yep, definitely using the correct Parent class, and the Editor knows about it fully. It just seems to be when using Frontend that it doesn’t work.