Creating a main menu
A main menu can serve as an introduction to your game and is a great place for us to discuss some additional things that UMG has, such as texts and buttons. We'll also learn how we can make buttons do things. Let's spend some time to see just how easy it is to create one!
Note
For more information on the client-server model, refer to https://en.wikipedia.org/wiki/Client%E2%80%93server_model.
How to do it…
To give you an idea of how it works, let's create an empty level to hold our menu:
Create a new level by going to File | New Level and select Empty Level.
Next, inside the Content Browser tab, go to our
UI
folder and navigate to Add New | User Interface | Widget Blueprint and give it a name (MainMenu
). Double-click on it to open up the editor.In this menu, we are going to have the title of the game, and then a series of buttons the player can press.
From the Palette tab, open up the Common section and drag and drop a Button onto the middle of the screen.
Select the button and...