void IUpdatableGraph.UpdateAreaInit(GraphUpdateObject o)
{
if (!o.updatePhysics)
{
return;
}
AstarProfiler.Reset();
AstarProfiler.StartProfile("UpdateAreaInit");
AstarProfiler.StartProfile("CollectMeshes");
RelevantGraphSurface.UpdateAllPositions();
// Calculate world bounds of all affected tiles
IntRect touchingTiles = GetTouchingTiles(o.bounds);
Bounds tileBounds = GetTileBounds(touchingTiles);
// Expand TileBorderSizeInWorldUnits voxels in all directions
tileBounds.Expand(new Vector3(1, 0, 1) * TileBorderSizeInWorldUnits * 2);
var meshes = CollectMeshes(tileBounds);
if (globalVox == null)
{
// Create the voxelizer and set all settings
globalVox = new Voxelize(CellHeight, cellSize, walkableClimb, walkableHeight, maxSlope, maxEdgeLength);
}
globalVox.inputMeshes = meshes;
AstarProfiler.EndProfile("CollectMeshes");
AstarProfiler.EndProfile("UpdateAreaInit");
}