Displaying single object pickups with carrying and not-carrying text
Often the simplest inventory situation is to display text to tell players if they are carrying a single item (or not).
Getting ready
This recipe assumes that you are starting with the project Simple2Dgame_SpaceGirl
setup from the first recipe in this chapter. So, either make a copy of that project or do the following:
- Create a new, empty 2D project.
- Import the
Simple2Dgame_SpaceGirl
package. - Open scene Scene1 (in the
Scenes
folder). - Set the Unity Player screen size to 800 x 600 (see the previous recipe for how to do this) and select this resolution in the Game panel the drop-down menu.
- Convert each sprite image to be of type Sprite (2D and UI). In the Inspector, choose Sprite (2D and UI) from drop-down menu Texture Type, and click on the Apply button.
For this recipe, we have prepared the font you need in a folder named Fonts
in the 1362_02_02
folder.
How to do it...
To display text to inform the user about the status of carrying...