Method RequestAction
RequestAction()
Requests an action for this agent.
Declaration
public void RequestAction()
Remarks
Call RequestAction() to repeat the previous action returned by the agent's
most recent decision. A new decision is not requested. When you call this function,
the Agent instance invokes OnActionReceived(ActionBuffers) with the
existing action vector.
You can use RequestAction() in situations where an agent must take an action
every update, but doesn't need to make a decision as often. For example, an
agent that moves through its environment might need to apply an action to keep
moving, but only needs to make a decision to change course or speed occasionally.
You can add a DecisionRequester component to the agent's
GameObject to drive the agent's decision making and action frequency. When you
use this component, do not call RequestAction() separately.
Note that RequestDecision() calls RequestAction(); you do not need to
call both functions at the same time.