Now we need to connect all the pieces together in to make the demo work. We to attach the SphereAgent script to the sphere, the SphereAcademy script to the Academy object and, of course, attach the Brain to the agent:
- We need to connect the Brain object to the SphereAgent component, as shown in the following screenshot:
- Set Decision Frequency to 5 and drag the cube object into the Target field.