AStar for 2D Pathfinding in Unity

June 8, 2019

Unity 2D Pathfinding

Using AStar

Youtube – 2D PATHFINDING – Enemy AI in Unity

By: Brackeys

This tutorial shows how to setup the general AStar package in a 2D Unity project. It goes over the basics of setting up an initial grid and getting a basic enemy AI that will make the enemy follow a target. It also has an example to setup your own simple AStar enemy AI script using AStar’s Pathfinding package.

This tutorial also cover the basics of setting up an enemy object with a graphics child object, flipping that graphic when the enemy should be going another direction, and just moving an enemy with physics and forces in general, instead of just updating position.