What happens when a graph object is selected in the editor?

Hi,

I’m having a weird issue which I am attempting to solve.

I have AI in my project which follow my player, which means that they need to leave a graph, then return to it. This system is working fine, but sometimes, when the AI returns to the graph, the AI seem to get stuck, almost like the graph is disabled.

I have found that if I click on the gameobject in the editor where the “pathfinder” component is added (And where the actual graph is), the graph and AI instantly start working again.

I should stress that I am not clicking on any buttons or anything within the graph settings, I am just clicking on the gameobject itself.

I need a way to do this from script, to fix my AI when this issue occurs.

I have tried disabling/reenabling the game object, calling the awake() method from script, etc, etc, but none of this works.

Is there some other function that is triggered when a gameobject with a pathfinder script attached is clicked in the editor?

Thanks!

Hi

Can you check your Project settings → Editor settings → Enter play mode settings. This package does not support having reload scene disabled. More recent versions warn about this if they detect this setting.