Building the Agent ecosystem
Now that we have a core set of rules, we can start to build our multi-agent ecosystem from scratch in Unity. Previously, we spent a considerable amount of time looking at the Unity canned samples, but that was essential in order to cover all the material to get to this point in such a short time. With all the core understanding out of the way, we can now build a more complex example by following this exercise:
- From the Project window, create a new folder called
Terrarium
underAssets
. - Create five new folders called
Materials
,Prefabs
,Scenes
,Scripts
, andTFModels
. - Create a new scene called
Terrarium
in theScenes
folder. - Open the new Terrarium scene and from the menu, select
GameObject -> Create Empty
. Rename the object toAcademy
. - Open the
Scripts
folder in the Project window. Create a new C# script calledTerrariumAcademy
. Edit the script so that it contains the following code:
using UnityEngine;
public class TerrariumAcademy : Academy {
...