using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class WorldGenerator : MonoBehaviour { public List availableTiles; Dictionary world; int SIZE = 10; // Start is called before the first frame update void Start() { world = new Dictionary(); generateWorld(); } // Update is called once per frame void Update() { } void generateWorld(){ Vector3 position; GameObject tile; for(int i = 0; i < SIZE; i++){ for(int j = 0; j < SIZE; j++){ position = new Vector3(i, 0, j); tile = Instantiate(availableTiles[0], position * 100, Quaternion.identity); world.Add(position, tile); } } } }