Let's put all of this together and build a functional and extensible pop up for the main menu.
This pop up will display the name of the game on the title screen and present the user with three working buttons. From this, we will be able to make a pop-up Prefab that can be used for other UI. Perform the following steps to create a main menu pop up:
To start, let's create the base of the panel. Create a plane that will be the base of the pop up. Set its position to
0
,0
,8.6
and its X rotation to-90
.Scale the panel to
1.54
,1
,1
so that it is a bit wider than it is tall.On the
MeshRenderer
, we associate a new material calledpopupMaterial
. This material has a white-colored component and a texture that is opaque gray with round edges with full alpha. Applying this material makes the plane appear rounded at the corners.Let's rename the plane to
popup_MainMenu
to reflect its actual role.The main menu pop up will have four child objects: a text field for the pop-up...