I ran into a problem where there is a huge lag spike when the navmesh is updated and I isolated the problem down to the function “Find Path To Actor Synchronously” creating paths that will never be destroyed so when the navmesh updates, thousands of paths will also update causing a big lag spike. How can I destroy these paths?
A workaround I used for pathtoactor is reducing how often the navmesh updates.
But I also created a custom FindPath that checks for a previous path, and if found, gets a new path. If the new path has a higher cost, then I use the previous path instead. I found that reduced FindPath’s cost a fair amount.
As for creating paths the will never be destroyed, I couldn’t help you there. Never looked into FindPathToActorSynchronously, sorry