Now, let's do the same thing for the Pause Panel. We'll do this slightly differently than the Inventory Panel, using the Input Manager instead of a KeyCode. We also need to actually pause the game.
To display the pause panel using the p key and pause the game, complete the following steps:
- First, we need to set up the Input Manager to include a Pause axis. Open the Input Manager with Edit | Project Settings | Input and expand the axes by selecting the arrow next to the word Axes.
- By default, your project has 18 axes. You can replace one of these with the new Pause axis if you aren't planning on using them, but we might as well just go ahead and make a new one. Definitely, don't delete the Submit