To use panels to visually outline the inventory area and individual items, follow these steps:
- Start with a new copy of the Simple2Dgame_SpaceGirl mini-game.
- In the Hierarchy window, create a UI Panel (GameObject | UI | Panel) and rename it Panel-background.
- Now, let's position Panel-background at the top of the Game window, stretching the horizontal width of the canvas. Edit the UI image's Rect Transform component and, while holding down Shift + Alt (to set its pivot and position), choose the top-stretch box.
- The panel will still be taking up the whole game window. Now, in the Inspector window, change Height (in the Rect Transform component) of Panel-background to 100.
- Add a UI Text object (Create | UI | Text) and name it Text-inventory. For its Text (Script) component, change the text to Inventory.
- In the Hierarchy window, set the child UI Text object, Text-inventory, to Panel-background.
- In...