Code
Create a new scene
Create a new GameObject called
Goap
, add theGoapRunnerBehaviour
to it.
Create a class called
WanderTarget
that extendsTargetKeyBase
.
WanderTarget.cs
Create a class called
IsWandering
that extendsWorldKeyBase
.
IsWandering.cs
Create a class called
GoapSetConfigFactory
that extendsGoapSetConfigFactoryBase
and override theCreate
method.
GoapSetConfigFactory.cs
Add the
GoapSetConfigFactory
to theGoap
GameObject. Make sure to add theGoapSetConfigFactory
to theGoapRunnerBehaviour
's factories property.
Create a script called
GoapSetBinder
. This script will assign aGoapSet
to theAgent
.
GoapSetBinder.cs
Create a sphere
GameObject
calledAgent
. Add theAgentBehaviour
,AgentMoveBehaviour
,AgentBrain
andGoapSetBinder
to theGameObject
.
Run the scene. The agent should move around randomly.
Last updated