Snap Bounds To Scene, On scene load?

Hi everyone!

I have a bunch of different scenes with their own size and I’m using the same A* that scans each time I load to a new scene, I just need to snap the bounds to make everything work like a charm!

I want to be able to use the “SnapForceBoundsToScene” method inside RecastGenerator.cs but I don’t know how to reach it… Does anyone have a clue how to reach it from my scripts?

You can use

AstarPath.active.data.recastGraph.SnapForceBoundsToScene();

See also https://arongranberg.com/astar/docs/recastgraph.html#SnapForceBoundsToScene

1 Like

Works like a charm!

Thanks a ton