public static BoidManager Main() { if (main == null) { main = FindObjectOfType <BoidManager> (); if (main == null) { Debug.LogError("Error: No Boid Manager instance in scene."); Debug.Break(); } } return(main); }
private void Awake() { BoidManager.Main().boidActors.Add(this); behaviours = new List <BoidBehaviour> (GetComponents <BoidBehaviour> ()); }
private void Awake() { main = this; }