Introduction
Welcome to the Runtime Navmesh Baker, your solution for runtime generation of AI Navmesh in Unity.
The Runtime NavMesh Baker package enables you to dynamically generate and update navigation meshes around the player as they move through your world.
Unity’s built-in NavMesh baking system is great for small, static levels, but it quickly runs into problems when applied to large, open, or highly dynamic environments. Full-world baking can mean excessively long bake times, high memory usage, or even crashes. And in most gameplay situations, a full bake isn’t necessary at all.
This package solves those limitations by baking only what’s needed, where it’s needed. Instead of attempting to generate a single massive navmesh for your entire scene, it continuously manages a localized navigation volume centered on the player.
Why bake locally?
Imagine a 1 km² map filled with terrain, buildings, and props. Baking a single navmesh across the entire scene would take hours (if it succeeds at all), but AI only ever needs navigation data near the player’s current location. By focusing on localized baking:
Your AI always has valid, up-to-date navigation surfaces.
Performance remains predictable, even as your world grows.
You avoid wasted compute and memory on faraway areas the player may never visit.
This approach also pairs naturally with runtime spawning systems, where enemies and creatures are introduced near the player. With a localized navmesh, they can immediately pathfind and interact with the environment without requiring a pre-baked world.
Key Benefits
Scales to Large Worlds Bake navigation dynamically in any size environment without the performance or memory issues of a full-scene bake.
Dynamic & Flexible Perfect for open-world games, procedurally generated maps, or any scenario where the environment changes at runtime.
Fast Iteration Skip long bake times in the editor—focus on your level design and let the system generate navmesh data at runtime.
AI-Ready Everywhere Always ensures enemies and NPCs have a valid navigation mesh nearby, no matter where the player goes.
Optimized Performance Only updates what’s needed, reducing CPU/GPU load and keeping frame rates stable.
Last updated