Code

  1. Create a new scene

  2. Create a new GameObject called Goap, add the GoapRunnerBehaviour to it.

Goap Runner Behaviour
  1. Create a class called WanderTarget that extends TargetKeyBase.

  1. Create a class called IsWandering that extends WorldKeyBase.

  1. Create a class called GoapSetConfigFactory that extends GoapSetConfigFactoryBase and override the Create method.

  1. Add the GoapSetConfigFactory to the Goap GameObject. Make sure to add the GoapSetConfigFactory to the GoapRunnerBehaviour's factories property.

Goap Runner
  1. Create a script called GoapSetBinder. This script will assign a GoapSet to the Agent.

  1. Create a sphere GameObject called Agent. Add the AgentBehaviour, AgentMoveBehaviour, AgentBrain and GoapSetBinder to the GameObject.

Agent
  1. Run the scene. The agent should move around randomly.

Last updated