Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

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

Discussion in 'AI & Navigation Previews' started by Noxalus, Oct 6, 2020.

  1. Noxalus

    Noxalus

    Joined:
    Jan 9, 2018
    Posts:
    76
    Hello everyone,

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

    upload_2020-10-6_16-59-47.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?
     

    Attached Files:

  2. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    101
    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.
     
  3. Noxalus

    Noxalus

    Joined:
    Jan 9, 2018
    Posts:
    76
    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.
     
  4. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    101
    Noxalus likes this.
unityunity