[Free Version] Scan on runtime doesn't carve objects with colliders

Hi! I’m making a “build your city” game, so I need to rebuild the graph everytime a new building is appended to the scene. Each Building is a prefab with its own colliders but whenever I try to rebuild with:

AstarPath.active.Scan(); or AstarPath.actives.Scan(pathFinder.graphs[0]);

It rebuilds the graph (I can see the logs stating the building time) but it doesn’t carve empty space around the new buildings.

Although if I Push Scan on the button on the Scene View, it works correctly and carves the graph around the buildings as expected.

I’m using a grid graph.

Am I missing something? Thanks

Hi

That’s odd. Are you sure all objects are properly initialized when you call AstarPath.active.Scan()? What happens if you delay scanning by 1 frame?

Hi Aron! You were right, delaying did the trick, just purchased the pro version and it goes lightning fast, I’ve been having so much trouble with Unity navmesh I hope this helps, thanks!

1 Like

This might be the issue I’m seeing, because I force an update the same frame I change position of a collider. 2D Grid Graph, point collision.