void Awake() { academy = FindObjectOfType <MazeAcademy>(); //cache the academy // goals = area.GetComponentsInChildren<CrateDestination>(); // blocks = area.GetComponentsInChildren<Crate>(); }
private void Awake() { if (academy == null) { academy = GameObject.Find("Academy"); } if (academy != null) { mazeAcademy = academy.GetComponent <MazeAcademy>(); } }