Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2022.2 beta is now available for testing. To find out what's new, have a look at our 2022.2 feature highlights.
    Dismiss Notice
  3. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
Dismiss Notice
Submit bug reports tagged with #Beta2022Win_Unity when you encounter unknown issues while testing the 2022.2 betas for a chance to win a year of Unity Pro. For more information, have a look at our Beta Sweepstakes Announcement.

Question 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:
    113
    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:
    113
    Noxalus likes this.
unityunity