Handling 2d procedural world generation

Hello! I’m sure this question has been asked a thousand times everywhere but I can’t find any answer that can explain clearly how the pathfinding on a procedural world works. I’ve also seen the example in the package and I looked at the proceduralGridMover’s docs, but I still have absolutely no clue on how procedural pathfinding works, and I can’t find proceduralGridMover class anywhere in the example project. Can anyone help me out? I followed the brackey’s tutorial to move an enemy AI in a fixed space, but now I’m importing this system into a endless world (a tilemap subdivided in squares, aka chunks). Also, in the example, it seems that the grid follows the object that needs to move. I’m guessing that every object that moves there has his grid. Is that correct? Doesn’t it create a lot of lag? My world is pretty big and there can be about 30-50 enemies at the same time nearby the player.
If you have any link that are tutorials for a 2d chunk-based terrain pathfinding, it would be wonderful. Google failed me this time :frowning:


There is an example scene called “Procedural” which showcases the ProceduralGridMover script.
Generally, you will only have one graph centered on the player. Then your other agents can use pathfinding while they are within some distance from the player.