S1.18 Setting the Game Mode to use our character

Lesson Summary

In this lesson, we covered:

  • The creation and set up of the game mode.
  • Using a player controller actor to define where we want to spawn the player.

What did we do?

✅ Updated for UE 5.4.1

Define the classes to use in the Game Mode

  • Create a folder called Framework inside the Core folder.
  • Create a Game Mode class called GM_MyDungeonCrawler (Blueprint Class Game Mode Base).
  • Open it, and in the Details (if you don't see it, click on the Class Defaults button) change the Default Pawn to our BP_MainCharacter class and the Player Controller to our PC_MyDungeonCrawler class.

Set our Game Mode to be the default Game Mode in our game

  • Open the Project Settings by clicking on Edit Project Settings...
  • Go to the Maps & Modes category, and change the Default Game Mode to GM_MyDungeonCrawler.

  • Change the Editor Startup Map and the Game Default Map to Dungeon_Level_01 for it to open every time we open the project and every time we run the game.

Use our character in the game

  • Delete the character we dragged and dropped previously into the level.
  • Add a Player Start to the level by clicking on the Place Actor button → Basic Player Start and position it as you see fit.

Unreal Engine Terminology

Gameplay Framework: Unreal Engine's Gameplay Framework is a collection of classes that provides you with a modular foundation upon which to build your gameplay experience. You can pick and choose which elements are right for your game knowing that these classes are designed to work with and complement one another.[1]

Game Mode: Game mode is the primary class that specifies which other classes to use in the gameplay framework and is commonly used to specify game rules for modes, such as capture the flag. [2]

Got Questions?

The UNF Games team is here for you! Members of our Private Community can ask questions about anything from this chapter by clicking on this link and creating a New Topic, where the Title starts with the Section and Video number.

Example title of new topic: [S3.12] Weird issue that I can’t solve

If you haven't yet checked out our Private Teachable Community, just click on this link and see what you have been missing.

Ready to move on? Click "complete & continue" to proceed to the next lesson.

Complete and Continue