we’ve recently updated our engine version from 5.5 to 5.6 (5.7 to come in the near future), and we’ve noticed a different behavior in navmesh generation related to actors assigned to runtime data layers.
For visibility, these are the runtime Data Layer settings:
From what I’ve tested, changing the IsInitiallyLoaded property to (false), but as far as I’m aware, this was an Editor-specific (workflow) property that previously didn’t impact navmesh generation.
Before we make a global change to our data layers settings, we want to understand the source of the change and the reasoning behind it in navmesh generation behavior.
Thanks for any insights on the matter, it’ll help us take the right decision for our data.
Are there any other settings or repro steps that might be needed? e.g is this a world partitioned navmesh? Any info would be valuable. Alternatively if you can provide minimal repro projects for each version that would help greatly.
Hi again, I was able to reproduce this behavior. I can confirm that:
- In 5.6 & 5.7 the actor only cuts through the nav mesh if the paths are built while the data layer is loaded at editor time.
- In 5.5 if the data layer is loaded in editor and the paths are built then the actors do not cut through the nav mesh
I have tried to discern why this change occurred by looking into the commit history for some of the navigation system files. I was not able to find anything concrete, however after the final release of 5.6 there were multiple commits regarding actors being included/excluded incorrectly for nav mesh generation. This change in behavior is possibly related to those changes.
Due to this behavior persisting in 5.7 it’s likely that the behavior in 5.5 was actually a bug that was fixed. However I haven’t been able to confirm this from the issue tracker. I think you would be safe to assume this is now the intended behavior of navigation generation.
Based on my observations and your comment, it would seem that it renders the BaseNavmeshDataLayer array in WorldSettings useless. We used this propery to ensure a Data Layer would affect navmesh generation no matter what.
Now since having a Data Layer in this array OR simply having the Data Layer IsInitiallyLoaded set to (true) gives the same navmesh generation results, what is now the purpose of the BaseNavmeshDataLayer array? It is still relevant in a matter we’re not aware of?
Overall, that change in behavior doesn’t really feel like an intentional change, but perhaps we’re missing something that would explain why it occured. Just looking for any information that could help understanding before simply flagging all/most Data Layers IsInitiallyLoaded to (false).
Once again, your insights are very much appreciated. Thanks a lot!
I suspect that the BaseNavmeshDataLayers property exists so that you can make sure that runtime data layers that aren’t loaded in editor can still be included without having to explicitly load them at editor time. I’ve done a bit of testing of this and I can confirm that in 5.6 this is how it seems to work.
I also did some tests with the “IsInitiallyLoaded” setting. What I’m seeing in 5.6 is that it doesn’t effect the mesh generation like the BaseNavmeshDataLayers property. If It is set to true and the runtime data layer isn’t loaded in editor, the actors within that datalayer do no effect the navmesh.
Please let me know if you are seeing different behavior on your end.
If It is set to true and the runtime data layer isn’t loaded in editor, the actors within that datalayer do no effect the navmesh.
I do observe the same behavior, and it makes sense in the case of local (in-editor) navmesh generation.
However (my bad, I should have brought this up earlier), in our case, we are building a large open world, so we are using automated build processes with commandlet to build our navmesh. In that case, the editor load state is irrelevant and the “IsInitiallyLoaded” state is the one considered by the build machines. This is what actually triggered this inquiry, since this is how we noticed that something had changed when we switched to 5.6 with our navmesh.
Thank you for the additional info. In light of that it seems like the IsInitiallyLoaded workaround you suggested would be appropriate in this situation.
I’ve made another attempt at finding a relevant ticket on the issue tracker but I have not been able to find anything pertaining to this issue. I think it’s safe to say that this is now the intended behavior for navmesh generation.