Changing gamemode at runtime.

I’m not entirely sure, but I would say: You can’t change the GameMode without reloading the Level.

I could be wrong here, but I don’t think UE4 is designed to switch out the GameMode in the middle of the game.
This would also switch out PlayerControllers etc and I doubt that this is easily possible without disconnecting people,
even in Singleplayer.

If you want to change the GameMode, you can do this:

Pre 4.14, you can add lines to your DefaultGame.ini to add shortcuts. This is done similar to this:


[/Script/Engine.GameMode]
+GameModeClassAliases=(ShortName="Group and Chat",GameClassName="/Game/BPNetworkingProject/Blueprints/GroupInviteChat/GICGameMode.GICGameMode_C")
+GameModeClassAliases=(ShortName="Free For All",GameClassName="/Game/BPNetworkingProject/Blueprints/DeathmatchLevel/DMGameMode.DMGameMode_C")
+GameModeClassAliases=(ShortName="Team-based",GameClassName="/Game/BPNetworkingProject/Blueprints/TeamDeathmatchLevel/TDMGameMode.TDMGameMode_C")

In 4.14 you can do this through the Maps and Modes tab in your Project settings.

This allows you to do this is in the OpenLevel URL:


open LEVELNAME?game=GameModeShortcut

After this, the map will be opened with the new GameMode.

1 Like