Creating the main menu level
In this section, you’ll be working on creating a new level that will serve as a starting point for creating a game session or joining one. You’ll be leveraging the power and flexibility of the previously created user interface by adding the needed Gameplay Framework classes, such as a dedicated GameMode and a player Pawn.
First things first, let’s open up your programming IDE and start writing some code!
Creating the Pawn
In this subsection, you’ll be creating a Pawn that will show the character model and activate the user interface through its controller. This Actor will also be used to show the character model when the player enters the main menu level.
So, from the Unreal Engine Editor, create a new C++ class extending from Pawn and call it US_MainMenuPawn
. Once the class has been created, open the US_MainMenuPawn.h
header file and add the following code just after the GENERATED_BODY()
macro:
UPROPERTY(VisibleAnywhere...