Hello, how can i to use pathfinding in 2d array of GO?
public GameObject tile;
public GameObject[,] tile_array;
public float gen_w;
public float gen_h;
public int MapW;
public int MapH;
void TileGen(){
for (int r = 0; r < MapW; r++) {
for (int c = 0; c < MapH; c++) {
float x = (r * (gen_w / 2)) / 100;
float y = (c * (gen_h / 2)) / 100;
tile_array[r,c] = (GameObject)Instantiate (tile, new Vector3 (x, y, 0), Quaternion.identity);
}
}
}