MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / RemoveTile

Function RemoveTile

Source/Engine/Navigation/NavMeshBuilder.cpp:351–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349void CancelNavMeshTileBuildTasks(NavMeshRuntime* runtime, int32 x, int32 y);
350
351void RemoveTile(NavMesh* navMesh, NavMeshRuntime* runtime, int32 x, int32 y, int32 layer)
352{
353 ScopeLock lock(runtime->Locker);
354
355 // Find tile data and remove it
356 for (int32 i = 0; i < navMesh->Data.Tiles.Count(); i++)
357 {
358 auto& tile = navMesh->Data.Tiles[i];
359 if (tile.PosX == x && tile.PosY == y && tile.Layer == layer)
360 {
361 navMesh->Data.Tiles.RemoveAt(i);
362 navMesh->IsDataDirty = true;
363 break;
364 }
365 }
366
367 // Remove tile from navmesh
368 runtime->RemoveTile(x, y, layer);
369}
370
371bool GenerateTile(NavMesh* navMesh, NavMeshRuntime* runtime, int32 x, int32 y, BoundingBox& tileBoundsNavMesh, const Matrix& worldToNavMesh, float tileSize, rcConfig& config, Task* task)
372{

Callers 2

GenerateTileFunction · 0.85
BuildDirtyBoundsFunction · 0.85

Calls 3

RemoveTileMethod · 0.80
CountMethod · 0.45
RemoveAtMethod · 0.45

Tested by

no test coverage detected