The first of our short tutorial series – we take a quick look at how to do simple things in Unreal, keeping it short and to the point.
Unreal knowledge unlocked:
- Access the level blueprint
- Display an interactable UI
- Changing levels
- Quitting the game
Create the UI
Create a UI Widget that contains a Play button and Quit button.
Create a Main Menu map
Under File -> New Level -> Basic. Make sure to SaveAs so you can decide where you want to save, and avoid potential engine crashes when trying to save normally.
Add a Camera Actor and set your desired view
In the Actor’s Panel in the Map view, search for CameraActor and add to the level. With the actor selected, you can change the position and angle to the desired view.
With the Camera selected, open the Level Blueprint, then right click to create a reference to the camera.
Note the level blueprint is not recommend to be used in instances where you need to access the nodes within as accessing them is difficult. Its fine in this situation, but others may be better served with Game Mode or an Actor blueprint.
Display the UI
In the level blueprint off EventBeginPlay, set up the following nodes:
Hook up the buttons
In this case, we set go to the Main Menu UI’s blueprint graph to connect the Start Game button to open the default first person map, and the Quit button to close the game.