# Proper Class type for Derived GameModes all in One Level?

**URL:** <https://forums.unrealengine.com/t/proper-class-type-for-derived-gamemodes-all-in-one-level/629000>\
**Category:** C++\
**Tags:** Class, UClass, unreal-engine, UE5-0, CPP, question\
**Created:** [August 15, 2022, 6:42pm UTC](https://forums.unrealengine.com/t/proper-class-type-for-derived-gamemodes-all-in-one-level/629000 "2022-08-15T18:42:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BlackmarsGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BlackmarsGames](https://forums.unrealengine.com/u/BlackmarsGames)\
**Post date:** [August 15, 2022, 9:09pm UTC](https://forums.unrealengine.com/t/proper-class-type-for-derived-gamemodes-all-in-one-level/629000/2 "2022-08-15T21:09:24Z")

</div>

Your game mode classes should all derive from RangeGameModeBase if it contains base class functions the derived class will need to use.

To dynamically specify which game mode to open a level with, you can use the options parameter to change the game mode you want the level to use.

This forum question should get you moving in the right direction.

> [@Changing gamemode at runtime.](https://forums.unrealengine.com/t/changing-gamemode-at-runtime/81504):
>
> 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 …

---

_[View the full topic](https://forums.unrealengine.com/t/proper-class-type-for-derived-gamemodes-all-in-one-level/629000)._
