public Boid InstantiateBoid(Vector3 position, bool isFish = false) { Boid boid = Instantiate(boidPrefab, position, Quaternion.identity, boidsParent).GetComponent <Boid>(); Boids.Add(boid); boid.Index = Boids.IndexOf(boid); boid.IsFish = isFish; return(boid); }