using System.Collections; using System.Collections.Generic; using UnityEngine; public class GenerateMap : MonoBehaviour { //Les 8 prefabs public GameObject[] maps = new GameObject[8]; //Les coordonées x dans l'ordre private int[] xs=new int[]{-17,0,17,-17,0,17,-17,0}; //Les coordonées y dans l'ordre private int[] ys=new int[]{26,26,26,13,13,13,0,0}; // Start is called before the first frame update void Start() { generateMap(); } //Place les 8 prefabs aux bons endroits public void generateMap() { for(int i=0;i<8;i++) { Instantiate(maps[i], new Vector3(xs[i], ys[i], 0), Quaternion.identity); } } void Update() { } }