Getting Technical With Unity AI
One of the hardest things in a game is building working and adopting enemy AI. The Unity store has many 3rd party AI plugins to help you build your game. The most popular of these are the RAIN AI starter kit as well as the Shooter AI. Both have free demos for you to try out before taking the plunge with the full version.
Several open project files from Unity do provide some great examples for dissection. A great example of player prediction AI can be found here. Another great example to look at is from a Survival Shooter example on the full creation of an enemy and it’s behavior, after the jump.
For those of you who want to code it alone, then pathfinding is a good place to start. This utilizes Dijkstra’s algorithm for calculating the shortest distance needed to travel on a weighted graph. From the South African game developer, Sebastian Lague provides us with a really in depth pathfinding tutorial explaining pathfinding algorithm.