Setting up the Detection Layers and Player Tag

Setting up the Detection Layers and Player Tag

The Tag and Layer Settings controls an AI's Detection Layers and Player Tag. These are used to allow the AI to know what Layers are detectable targets as well as what targets are players.

To set up your Player Tag, assign your player object's Unity Tag (the tag that was assigned using Unity's Tag pulldown at the top of the gameobject).

To assign layers to the Detection Layers, open the Layer Mask dropdown menu and assign the layers you want the AI to detect. This is typically a player layer and an AI layer. With this is example the enemy Layer is Enemy and the player layer is Player.

Was this helpful?