Recalculate paths automatically is overridden at runtime

Hey,

I noticed that “Recalculate paths automatically” is set to “Never” when I use behaviour designer. I talked to their support and they cannot figure out why, all that is called behind the scenes is:

agent.destination = target;
agent.SearchPath();

Is this intentional? I want it to stay at dynamic with a 2 second interval.

bild

Might be hard for you to answer this but can you let me know what the variable that controls these values is called so I can search for it, and try to find where this happens?

Hi

I checked the code and I can’t see how this would happen.
Are you sure your code is not setting the ai.canSearch property?

Their code is setting canSearch = true, after removing it the issue is fixed. Seems a bit unintuitive that this line would effect that value but good to know!

This was the org. code:
bild

Definitely. canSearch is (in the beta version) a deprecated field. I had to add some compatibility logic to make it set the relevant new fields. I have improved it a bit in my dev version now, so that if setting it wouldn’t have changed anything before, it will not change anything now either.
However, setting canSearch to true shouldn’t have caused this… Only setting it to false would have… Not sure what’s going on there.