I wanted to know if this project supports staggered isometric grids directly? If not, are there any recommended third-party tools or resources that cater specifically to staggered isometric grids in Unity? Any insights or experiences shared would be greatly appreciated.
By calling Scan at the end, you’ll be destroying all nodes and re-creating it from scratch.
Instead, I’d recommend something like:
AstarPath.active.AddWorkItem(new AstarWorkItem(ctx => {
var gg = AstarPath.active.data.gridGraph;
gg.GetNodes(node => {
Vector3 worldPoint = (Vector3)node.position;
if (worldPoint.x > leftBound && worldPoint.x < rightBound &&
worldPoint.z > bottomBound && worldPoint.z < topBound) {
node.Walkable = false;
}
});
// Recalculate all grid connections
// This is required because we have updated the walkability of some nodes
// Note: In a future update, you'll want to change this to gg.RecalculateAllConnections, for performance.
gg.GetNodes(node => gg.CalculateConnections((GridNodeBase)node));
}));