Adding Markers
Last updated
Last updated
Adding Markers to GameObjects in your scene is easy with the MiniMap Component in this Module. Six coloured Dots are provided in the Graphics folder, but you can use any graphic of your choice.
As this feature works with Tags, you should first decide what tags you want and which markers 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.
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.
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.
Next you need to add a trigger, probably and OnStart trigger, and add the Action for adding Markers.
At first you will see that the Marker Type field is Zero and there are no markers. Decide howmany markers you want (you can change this number later), and enter it - we have entered 3. Then you should add the Tags that you created by typing the name, and select an image to represent this tag on the map. You can also change the scale (how big the marker will appear) of the markers.
And thats it. Press play and test your map markers. You should see them in both the MiniMap and the full screen Map.
You can now use Actions to toggle Markers (show/hide) and to blink markers of importance or significance. To blink a marker, choose a trigger and add the Blink marker Action.
Add the GameObject that is Tagged with the Marker you wish to Blink, and the Blink rate. To stop the blinking, you use the Action Stop Blink Map Marker, and drag in the Above Action that started the Blink.
For further details on Map Markers, show/Hide, and Blink, see the Example that is included in this Module.