AI Planner - How does "Wait for Manual Execution Call" work?

Hello everyone,

In the DecisionController component, it’s possible to choose the Execution Mode:

6388824--712092--upload_2020-10-6_16-59-46.png

By default, it’s set to Act Immediatly, but for our case, we would like to use Wait for Manual Execution Call as we want to be able to decide exactly when the agent has to take a decision.

But what is the method I need to call to make the agent take the decision to execute the first top action of the graph?

I thought it was UpdateExecutor() but it doesn’t seem to be that and my agent doesn’t take decision at all.

Did I miss something?

6388824--712092--upload_2020-10-6_16-59-46.png

I apologize for the confusion. This is, unfortunately, a known issue with the last release. It will be fixed in the next release, which is currently held up internally (no ETA).

There is a way to work around this, however. You can set up your actions or action coroutines to not terminate until some code on your side signals them to. The actions will effectively be polling every frame to see if they should terminate. It’s not pretty, but it should get you roughly the desired behavior.

Thank you for your answer @TrevorUnity .

It’s could be a good way to do that indeed!

What I actually did for now is disabling the AutoUpdate to manage when the UpdateExecutor method is called and so, when the agent will take a decision.

New release with the fix for manual execution calls: https://discussions.unity.com/t/815598

1 Like