# Adding Labels

Adding Labels to GameObjects in your scene is easy with the MiniMap Component in this Module. It is very similar to adding Markers (see previous Page) but as Map lables are created with Text Mesh Pro text, you must first indlue TMP in you project using the Unity Package manager.

This feature also works with Tags, and therefore you should first decide what tags you want and what Text will be used. The Tags can be anythng you want, but you must add them to your project using the Tags Editor in the Inspector. Click on any object in your scene and you will see that it is probably Untagged.&#x20;

![](https://1680659799-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LauqCzuMnmk33t__Yp5%2F-M0rDcfYtY2z6GhTisTt%2F-M0rFjZd1K5jquuKHPRo%2Fm13.jpeg?alt=media\&token=1b6c7aa3-64c8-45a8-96f1-ded443faa55b)

Click on the Untagged dropdown and select Add tag. Here you can add new tags using any name that is meaningful to you. We have added item, enemy, label, and green, and "label" will be used to this example.

![](https://1680659799-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LauqCzuMnmk33t__Yp5%2F-M0rDcfYtY2z6GhTisTt%2F-M0rG4ap9PenBP-Ri5wv%2Fm9.jpeg?alt=media\&token=46f74b8f-68ff-47e2-8794-a6e37501c3ae)

You can add these Tags to the GameObjects. You can Tag as many Objects as you want to show in the Map with the same Tag, or have a separate Tag for every Object. This is your choice.

![](https://1680659799-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LauqCzuMnmk33t__Yp5%2F-M0rJ2OuPlujYdzpfcGb%2F-M0rKGJxwP_vBrBWiux6%2Fm14.jpeg?alt=media\&token=7848ba29-fa32-4ae5-aa2c-ce83a0bc6e03)

Next you need to add a trigger, probably and OnStart trigger, and add the Action for adding Labels.

![](https://1680659799-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LauqCzuMnmk33t__Yp5%2F-M0rJ2OuPlujYdzpfcGb%2F-M0rKUBR3-LPn74imOr3%2Fm15.jpeg?alt=media\&token=a08daa0f-68c1-4c2e-b36a-373a7a6801dc)

You will notice that the first part of this Action is the same as adding Markers. You have a Scale, number of types, and the Tag for you to enter.

Next you type in the Text you want displayed, choose the colour, and if you want the Text to include a text Outline. Then there is the culling layer and this is different than the Markers. Markers use a one sided transparent Shafder and therefor are only seen by the Map Cameras and not the Player Camera. However, Text Mesh Pro does not use this shader, and if you player looks into the sky, they will see the floating Text Labels.

The solution to this problem is to add a culling layer to your Main Camera. Select your Main Camera and in the Inspector, click on Layers and select Add layer. You will see the below panel, where you can select any empty slot and add a name of your choice. We have added TMPLabels to slot 11. You then add "11" or the slot number you chose, to the Action as shown above.

Finally, back in your Main Camera, select the Culling Mask dropdown, and make sure that your culling layer (TMPP Labels) is NOT seleted. This will allow the Camera to ignore your Label Text.

![](https://1680659799-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LauqCzuMnmk33t__Yp5%2F-M0rL_KQdz0W4fo_RSrJ%2F-M0rMw4NSssyjw5r7VhG%2Fm17.jpeg?alt=media\&token=6dc33d27-9dc9-41e1-b159-017dd002c2c5)

And thats it. Press play and test your map markers. You should see them in both the MiniMap and the full screen Map.

For further details on Map Lables, see the Example that is included in this Module.
