Hi, I Am working with instanced static mesh, spawn the components and fill them in game, everything work fine but navmesh ignore the components, if i run the code in editor the navmesh work correctly.
how do I make sure navmesh doesn’t ignore the UInstancedStaticMeshComponent created at runtime?
Howdy malock89, welcome back and thank you for posting.
The concern may be due to your navigation settings. I found a relevant thread that may provide more help. Its discusses changing your navigation settings. In UE5, I believe, you may want this set to Dynamic.
Thanks, i have set the runtime generation to dynamic and checked generate navigation only around navigation invoker .
I notice that if i press play, f8, than move the instances, the navmesh start to work on them too.
then I found a partial solution forcing the navmesh to update the instancedStaticMeshComponent toggling SetCanEverAffectNavigation(already set to true) after the begin play
Must be careful not to call AddInstances() before RegisterComponent(), this will crash the engine. However even calling it at the end does not solve the problem