In the last section, we created the
Waypoints script and the
, which will be used to limit the enemy movement and direction. In this section, we need to create the enemy game object, which will contain the waypoint and our AI character. We will use a prefab similar to that of the player character but remove some of it that is not necessary for the enemy.
We will start by creating the empty game object to contain the
AI and the
Enemy. Then, assign its transform by clicking on this game object and go to the Inspector view to reset the transform to default, as follows: