Creating a pop-up menu
In this recipe, we are going to see how we can use the techniques learned in the Creating a menu with an entrance transition recipe to create a pop-up menu. Pop-up menus are useful when you want to give instant feedback or even instructions to the player. They can be an unobtrusive way of providing information to the user at specific points during the game.
How to do it...
In the first step, let's create a new menu — a panel called Pop-up Menu — and three buttons as its children.
After we have selected it, we then click on Add Property in the Animation window. Unity asks us to choose a folder and a name for our animation, and we can rename it to MenuEntryPopUp.
The next step is to create the animation, so click on the Rec button and move the vertical bar in the timeline to 1 second; this means the sixtieth key frame if the sample is set to 60. Using Rect tool, reduce the dimensions of all the buttons to zero:
Tip
The vertical bar is not shown by default. In order to make...