public void LoadRandomTile() { TilePath tile = GetRandomTile(zoom, scale1024); if (tile.IsValid()) { LoadTile(tile); } else { Debug.Log("Unable to load tile"); } }
public void ExportReal() { TilePath tile = maps ? GetRandomTile(10, true) : GetRandomTile(12, false); Debug.Log(tile.texture); if (tile.IsValid()) { ExportTile(tile, "real"); } else { Debug.Log("Unable to load tile"); } }
private void LoadTile(TilePath tile) { if (tile.IsValid()) { terrainLoader.heightmap = tile.LoadHeightRGB(); terrainLoader.texture = tile.LoadTexture(); terrainLoader.rgbMap = true; terrainLoader.Init(); } else { Debug.Log("Unable to load tile"); Debug.Log(tile.heightGS); Debug.Log(tile.heightRGB); Debug.Log(tile.texture); } }
public void Export() { TilePath tile = new TilePath( Path.Combine(basePath, "arith_" + index + "_gs.png"), Path.Combine(basePath, "arith_" + index + "_rgb.png"), Path.Combine(basePath, "arith_" + index + "_tex.png") ); if (tile.IsValid()) { ExportTile(tile, exportName); } else { Debug.Log("Unable to load tile"); Debug.Log(tile.heightGS); Debug.Log(tile.heightRGB); Debug.Log(tile.texture); } }
public void ExportGenerated() { string prefix = maps ? "map" : "tile"; TilePath tile = new TilePath( Path.Combine(generatedPath, prefix + "_generated_" + index + "_gs.png"), Path.Combine(generatedPath, prefix + "_generated_" + index + "_rgb.png"), Path.Combine(generatedPath, prefix + "_generated_" + index + "_tex.png") ); if (tile.IsValid()) { ExportTile(tile, "generated"); } else { Debug.Log("Unable to load tile"); Debug.Log(tile.heightGS); Debug.Log(tile.heightRGB); Debug.Log(tile.texture); } }