# Navmesh runtime regeneration

**URL:** <https://forums.unrealengine.com/t/navmesh-runtime-regeneration/336914>\
**Category:** AI\
**Tags:** navmeshbounds, unreal-engine, navmesh, UE4, CPP, question\
**Created:** [October 29, 2015, 10:38pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-regeneration/336914 "2015-10-29T22:38:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_57163aaf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_57163aaf](https://forums.unrealengine.com/u/anonymous_user_57163aaf)\
**Post date:** [October 29, 2015, 10:38pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-regeneration/336914/1 "2015-10-29T22:38:22Z")

</div>

I’ve put in a NavmeshBoundsVolume in my map. My question is regarding the recalculation of Navmesh on-demand from my C++ code. Is there any avenue to do so?

I know of the

> RuntimeGeneration=Dynamic

 setting in _DefaultEngine.ini_. But this happens on changing any Dynamic object in the environment. There might be scenarios I want it to be recalculated only in specific situations, not every time. Is there a way to do so through code? Maybe call an event or something …

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [October 30, 2015, 12:22am UTC](https://forums.unrealengine.com/t/navmesh-runtime-regeneration/336914/2 "2015-10-30T00:22:49Z")

</div>

You’ll need to manually lock and unlock navmesh generation using `UNavigationSystem::AddNavigationBuildLock` and `UNavigationSystem::RemoveNavigationBuildLock`. Navigation needs to be configured for Dynamic generation for it to work.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_57163aaf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_57163aaf](https://forums.unrealengine.com/u/anonymous_user_57163aaf)\
**Post date:** [November 1, 2015, 1:49am UTC](https://forums.unrealengine.com/t/navmesh-runtime-regeneration/336914/3 "2015-11-01T01:49:27Z")

</div>

Thanks Mieszko! I’ll try it in this upcoming week. Your prompt responses are a life-saver!

---

<div class="post-metadata">

**Author:** ![SOuNDSNC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SOuNDSNC](https://forums.unrealengine.com/u/SOuNDSNC)\
**Post date:** [July 4, 2018, 9:06pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-regeneration/336914/4 "2018-07-04T21:06:39Z")

</div>

Maybe I’m missing something but “RemoveNavigationBuildLock” wants to rebuild the entire navmesh. I see there’s a skiprebuild flag but only for the editor. Is there a way to circumvent this? I do not want to rebuild my entire navmesh, only dirty tiles.

---

<div class="post-metadata">

**Author:** ![Cykablatta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cykablatta](https://forums.unrealengine.com/u/Cykablatta)\
**Post date:** [July 1, 2025, 8:25am UTC](https://forums.unrealengine.com/t/navmesh-runtime-regeneration/336914/5 "2025-07-01T08:25:12Z")

</div>

> [@SOuNDSNC](#):
>
> “RemoveNavigationBuildLock”

Is it a bp node? Or are you talking about C++? @SOuNDSNC @MieszkoZ
