AI implement for 2D mode, which implements A* Pathfinding Project
Their package files will not included in this repository, visit their site to download it :)
- Remove other entity movement components
- Attach
Astar Character Movement 2D
to your character entity
- Create empty game and attach
Pathfinder
component
- In
Graph
section selectGrid Graph
- In
Grid Graph
setting, enable2D
andUse 2D Physics
- Then set
Width
,Depth
,Node size
andCenter
, make it cover the map
- Set
Collider type
toPoint
- Set
Obstacle Layer Mask
by select layers that you want to make it as obstacles