Introduction
Welcome to the Runtime Navmesh Baker, your solution for runtime generation of AI navigation meshes in Unity.
The Runtime NavMesh Baker package enables you to dynamically generate and update navigation meshes as your players move through the world — or bake the entire scene once at runtime if that’s all you need.
Unity’s built-in NavMesh baking system is great for small, static levels, but it quickly runs into problems in larger or more dynamic environments.
Full-scene bakes can mean excessively long bake times, high memory usage, or even editor crashes.
In most gameplay scenarios, a full bake isn’t even necessary — AI only needs navmesh data near the action.
The Runtime Navmesh Baker solves these limitations by providing multiple bake strategies:
Continuous AABB — a moving “bubble” of navmesh that follows the player.
Grid Cells — a streaming window of fixed cells baked around the player, ideal for procedural or infinite worlds.
One Shot (new in 1.4.0) — bake the entire scene once at runtime, skipping long editor bake times while still delivering a full navmesh.
Why bake smart?
Imagine a 1 km² map filled with terrain, buildings, and props:
Baking a single navmesh across the entire scene in the editor could take hours (if it succeeds at all).
But AI only ever needs navigation data where the player currently is.
By focusing on localized or mode-appropriate baking:
Your AI always has valid, up-to-date navigation surfaces.
Performance remains predictable as your world scales.
You avoid wasted compute and memory on faraway areas the player may never visit.
This approach also pairs naturally with runtime spawning systems. With a navmesh always ready in the relevant area, enemies and NPCs can spawn, pathfind, and interact immediately without requiring a pre-baked world.
Which Bake Mode Should I Choose?
Runtime Navmesh Baker supports three bake strategies:
Continuous AABB — A moving “bubble” of navmesh follows the player or camera. Best for small/medium handcrafted maps where you only need navigation near the player.
Grid Cells — The world is divided into cells, and a window of cells around the player is kept baked. Best for large or procedural/streaming environments.
One Shot — The entire scene is baked once at startup or on-demand. Best for large handcrafted maps where pre-baking in the editor isn’t feasible.
See Bake Modes: Continuous, Grid, One Shot for diagrams, trade-offs, and setup examples.
Key Benefits
Scales to Any World Size Bake dynamically in massive environments without the performance or memory issues of a full-scene bake.
Multiple Bake Modes
Continuous AABB (bubble around player)
Grid Cells (streaming procedural maps)
One Shot (full scene at runtime)
Dynamic & Flexible Perfect for open worlds, procedurally generated maps, or any scenario where the environment changes at runtime.
Fast Iteration Skip long editor bake times — focus on level design and let the system generate navmesh data at runtime.
AI-Ready Everywhere Ensures enemies and NPCs always have valid navigation meshes nearby.
Optimized Performance Updates only what’s needed, keeping CPU/GPU usage predictable and frame rates stable.
Last updated