It looks like a few people have struggled with this. The last answer / set of comments on this page might help: [4.7] Navmesh doesn't build at runtime (It is checked) - World Creation - Unreal Engine Forums
Hi, I’m trying to build a kind of infinite top-view platform using a bunch of pieces of ground that are dynamically intercalated to make the neverending illusion. Each piece has a nav mesh bounds volume (for simple “move to” behavior for my enemies)
The problem: if i move my piece of ground and also move my NavMeshBoundsvolume in code (using SetActorLocation) the navigation is not rebuilt automatically. My moved piece of grounds get without navigation, even with the nav mesh volume also at the new position. If I do the same in editor it rebuilds (even if I move a little bit on editor while playing the game, it does).
The option “Runtime generation” is checked. Also, I have tried to call “RebuildNavigation” command by C++ but nothing happened. GetWorld()->GetNavigationSystem()->MainNavData->RebuildAll() didn’t work too (I don’t know if it would be the case…)
Is there a way to regenerate or “translate” a navigation mesh outside the editor using C++?
Thanks for the quick answer, but I’m afraid I can’t use the same solution, as I’m not able to find the “Settings (Next to Marketplace) Then general > Navigation Mesh / Settings - rebuild at runtime” option – I’m currently using UE 4.9.2. Actually, the option for “Runtime Generation” is “Dynamic” in Project Settings (not just checked as I mentioned); “Force Rebuild on Load” makes no effect for me.
Did you solve this someway?
No, in fact we didn’t take this idea of “endless arena” forward.
For the record, in UE 4.25 setting Project Settings > Runtime Navigaton to “Dynamic” and using “RebuildNavigation” console command (either in BP or C++) after moving navmesh does the trick - navigation is rebuilt after navmesh volume is moved.
EDIT: executing console command with ExecuteConsoleCommand BP node always works, but for me only
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), "RebuildNavigation");
worked in C++.