// Use this for initialization void Start() { background = transform.Find("Background").gameObject.GetComponent <Tilemap>(); //messy but w/e walls = transform.Find("Walls").gameObject.GetComponent <Tilemap>(); itemPopulator = GetComponent <ItemPopulator>(); GenerateMap(mapSize, numberOfRooms); }
// Use this for initialization void Start() { itemPopulator = GameObject.Find("Tilemap").GetComponent <ItemPopulator>(); }