private void Start() { if (roomSize < 2.5f) { throw new UnityException("room size is too small"); } generator = new MazeGenerator(columns, rows); generator.BuildInUnity(floorPrefab, wallPrefab, roomSize); monstersContainer = new GameObject(); InitContainer(); // After 10 seconds, the game will spawn a monster every min StartCoroutine(Spawn(10.0f, 60.0f)); }