Path was being created through blocked tiles, but fixed it

In my game path was being created over the blocked tiles. Then in code execution order I rearranged codes and made PathFinder code execute after GridManager and Tile. Now its working.

5 Likes

I had the same problem. I fixed mine by moving a block of code in the Tile class. I moved the code out of Start() and into Awake() to ensure it executes before the Pathfinder BFS which is triggered in Start.

2 Likes

This worked for me, thanks for sharing!

Yep. I had to do this too. These are the settings that worked for me (in case anyone reading this later wants additional details)

Edit > Preferences > Project Settings > Scrip Execution Order

3 Likes

This Fixed The Issue For Me, I think this will be the right solution for most people experiencing the problem!

Privacy & Terms