-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Unity 4.x Game Development by Example: Beginner's Guide
By :

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. (You can actually select anything in this step. We're not actually applying a tag—just creating one. But we need to select something so that we see the tag interface show up in the Inspector panel. You can also reach it by navigating to Edit | Project Settings | Tags in the Unity menu.)
At the top of the Inspector panel, press and hold on the drop-down labeled Tag, and select Add Tag….
Click on the gray arrow to expand the Tags list near the top of the TagManager.
Click in the blank area beside 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. (This is when it counts.)
In the Inspector panel, choose your new bomb tag from...
Change the font size
Change margin width
Change background colour