Time for action - tag the objects
As we saw before with our bouncing heart, we can tag objects in the Scene, and then refer to objects in code using their tag names. Let's tag the bomb and the stein so that the player character can tell what hit him.
- Select the Bomb Prefab in the Project panel.
- At the top of the Inspector panel, press and hold on the dropdown labeled Tag, and select Add Tag....
- Click on the gray arrow to expand the Tags list near the top of the Tag Manager.
- Click in the blank area to the Element 0 label, and type the tag name bomb. Then punch in a tag called stein.
- Select the Bomb Prefab again in the Project panel.
- In the Inspector ...