Nav link doesn't update on first opening editor if it's a child actor
I've made a NavLinkObject class which is just a NavLinkProxy without the simple links and sprite/navLinkRendering components so that we can build doors and windows and things like that. We want our AI to be able to go through these links to unconnected nav zones without having to recalculate nav mesh all the time. It works perfectly when I put it in a door for example, and throw that into a level directly, but when it's set as a child actor on another object, the link doesn't exist in the nav tree until I jiggle or move its parent actor to force a nav update. Additionally, it works just fine when first placing the object into the world for the same reason, since it forces a nav update.
The object I'm using that's causing this is a blueprint actor created by adding mesh and other components. It's a small house with a front and back door which are themselves actors, in this case NavLinkObject actors with logic for locking, opening, etc. When first running the editor no AI can path into or out of the house, and running a Find Path to Actor Synchronously check in the level blueprint fails to cross the doorways. If I adjust something in the house actor, like adjusting a light position, and recompile it the nav link displays where the doors are disappear from the main view. As soon as I slightly move the house's position to force a nav update the link visualization comes back and pathing works correctly. This has to be done to each instance of the house actor every time the editor is closed and restarted.
Are there any known workarounds for this? Prefab-like actors are kind of a pain to use right now, as child actor components with any sort of complexity don't play very nicely with each other without a lot of scripting workaround. Is there a way to force a construction script to re-run on an actor only in editor mode when it's first loaded up, or something like that?
Edit: This is in 4.7.3
Thank you for providing the sample project. The setup there was actually quite a bit simpler than I was attempting, and I was easily able to reproduce the issue. I have submitted a report of my observations to have this investigated further (UE-16445). I also tried testing this in version 4.8 and our latest internal version, but was unable to do so due to other issues.
answered Jun 01 '15 at 08:14 PM
Tim C ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here