In this section, you will set up the enemy with the necessary components to chase the player around the scene. First, let's make the enemy a NavMesh Agent. This will allow the enemy to detect the NavMeshes in the scene, calculate movement paths, and navigate around obstacles. Select the enemy game object in the hierarchy. Search for and add a NavMesh agent component. The NavMesh agent component provides various properties that can be adjusted to change the movement of your enemy. Find the speed property under the Steering heading, and set it to something around 2.5. The enemy still won't move around the scene, because it doesn't know where to go yet. You need to give it a target in a new script. Select the enemy game object in the hierarchy. In the Add Component menu, search for and select New Script. Name the script Enemy Movement and press Enter. This will create a new script component attached to the enemy game object. To keep things organized, let's move the script into the Scripts folder. Open the Enemy Movement script by double clicking it in the Scripts folder or in the Script component in the Inspector. In this script, you'll be referencing properties of the AI navigation package. Add using UnityEngine.AI to the top of the script, right under the using UnityEngine line. This gives you access to some NaveMesh-related functions and the properties you'll need. You'll also need to add a reference to the Player Game Object, since the player will be the enemy's target. Add a new line and declare a variable named player of type transform. This will allow us to access the player's position. Next, we'll need to reference the NavMesh agent component on the Enemy Game object. Declare a private variable named NavMesh agent of type NavMesh Agent. In the start function, add this line between the curly brackets. This line of code will find and assign the NavMeshAgent component to the NavMeshAgent variable. Moving on, in the Update function Every Frame, we will check if the player exists with a null check. If the player is found, the enemy should move towards it. You can do that by setting the NavMesh Agent's destination to the player's position. The exclamation mark and equal sign makes a not condition. The line therefore means if the player does not equal null, or if the player does exist, continue with the function. Remember to add a semicolon at the end of each line. Save the script, and return to the Unity Editor. Select the enemy game object in the hierarchy, and then drag the player game object into the player slot of the enemy movement script component in the Inspector. This will assign the player game object to the player variable in the script so that the enemy knows the player is its target. Save the scene, and run the game. You should now see the enemy move around and follow the player game object. You have successfully implemented enemy movement in your game. Next, you'll create a few obstacle objects the player can hide behind.