In this section, we'll create our own scene with flocks of objects and implement the flocking behavior in C#. There are two main components in this example: the individual boid behavior and a main controller to maintain and lead the crowd.
Our scene hierarchy is shown in the following screenshot:
As you can see, we have several boid entities,
UnityFlock, under a controller named
UnityFlock entities are individual boid objects and they'll reference to their parent
UnityFlockController entity to use it as a leader. The
UnityFlockController entity will update the next destination ...