public static class NavMeshBakerTurns level geometry into a navmesh: rasterise, filter, erode, partition, trace, polygonise.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The whole pipeline is here as a sequence of calls, and each stage is a type of its own in this namespace, so a tool that wants to draw the voxels or the regions can run the stages itself. What this adds is the order, the unit conversions, and the tiling.
Baking is offline work. A tile of a large level takes tens of milliseconds and allocates freely — it is a content-build step and an editor operation, not something a frame does. The runtime half of this assembly, everything a game actually calls per frame, allocates nothing after its first use.
Methods (4)
public static NavMeshTileData? Bake(ReadOnlySpan<Vector3> vertices, ReadOnlySpan<int> indices, BoundingBox bounds, NavMeshBuildSettings settings, ReadOnlySpan<NavAreaVolume> volumes = default(ReadOnlySpan<NavAreaVolume>), ReadOnlySpan<NavOffMeshConnectionData> connections = default(ReadOnlySpan<NavOffMeshConnectionData>))Bakes one tile covering everything given to it.
public static NavMeshTileData? Bake(ReadOnlySpan<Vector3> vertices, ReadOnlySpan<int> indices, NavMeshBuildSettings settings, ReadOnlySpan<NavAreaVolume> volumes = default(ReadOnlySpan<NavAreaVolume>), ReadOnlySpan<NavOffMeshConnectionData> connections = default(ReadOnlySpan<NavOffMeshConnectionData>))Bakes one tile covering the geometry's own bounds.
public static NavMeshBakeResult BakeTiles(ReadOnlySpan<Vector3> vertices, ReadOnlySpan<int> indices, BoundingBox bounds, NavMeshBuildSettings settings, int tileSize = 64, ReadOnlySpan<NavAreaVolume> volumes = default(ReadOnlySpan<NavAreaVolume>), ReadOnlySpan<NavOffMeshConnectionData> connections = default(ReadOnlySpan<NavOffMeshConnectionData>))Bakes a grid of tiles.
public static BoundingBox Volume(ReadOnlySpan<Vector3> vertices, NavMeshBuildSettings settings)The volume the geometry occupies, with a cell of slack so nothing sits on the boundary.
Used by (25)
- BakeBenchmarksVixen.Benchmarks.Navigation
- CrowdBenchmarksVixen.Benchmarks.Navigation
- PathQueueBenchmarksVixen.Benchmarks.Navigation
- QueryBenchmarksVixen.Benchmarks.Navigation
- CrossTileConnectionTestsVixen.Navigation.Tests
- CrowdRetargetTestsVixen.Navigation.Tests
- CrowdTestsVixen.Navigation.Tests
- DetailMeshTestsVixen.Navigation.Tests
- HeightfieldTestsVixen.Navigation.Tests
- NavAreaVolumeTestsVixen.Navigation.Tests
- NavMeshAssetTestsVixen.Navigation.Tests
- NavMeshBakeTestsVixen.Navigation.Tests
- NavMeshDebugDrawTestsVixen.Navigation.Tests
- NavMeshQueryTestsVixen.Navigation.Tests
- NavPathQueueJobTestsVixen.Navigation.Tests
- NavPathQueueTestsVixen.Navigation.Tests
- NavTileCacheVixen.Navigation
- NavTileCacheTestsVixen.Navigation.Tests
- NavigationAllocationTestsVixen.Navigation.Tests
- NavigationSystemTestsVixen.Navigation.Tests
- OffMeshConnectionTestsVixen.Navigation.Tests
- RegionMergeTestsVixen.Navigation.Tests
- WatershedTestsVixen.Navigation.Tests
- EditorApplicationVixen.Editor.App
- NavMeshImporterVixen.Editor.Assets