How to reach 2D Grid from script? How to reach every tilemap location and use them for pathfinding?

Hello

I’m trying to make a game like pacman and i want enemy to chase player. In order to do that I found out that A* is the best algorithm for this case. However, in all tutorials and source codes that i found, everyone created their grid from script. I created my grid manually and can’t reach it through script. How can i reach it?

I actually remove the grid component and added Grid script based on this video series of Sebastian Lague ( A* Pathfinding (E01: algorithm explanation) - YouTube )