I just wanted to check what was needed to change the gamemode at runtime. I setup a dummy level with all of the current gamemode options desired, and can’t get GetWorld()->SetGamMode(url) to change the current GameMode through C++. Being able to change the GameMode at runtime would vastly simplify having to setup hud management, and controls.
I’m trying to change from the normal combat based GemeMode to one that has settings for navigating through text menus.
My current code for changing the GameMode is:
FURL url = FURL(NoInit); url.Map = "DialogueUILevel"; url.Protocol = "unreal"; if(GetWorld()->SetGameMode(url)) GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, TEXT("DialogueUILevel game mode loaded")); else GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, TEXT("game mode not loaded"));