Has anybody had any luck with this? Setting the growth axis to “BlockMap.GrowthAxis.Forward” seems to generate all the chunks piled on top of each other no matter what I do.
var blockPrefab:GameObject = Resources.Load("StandardBlock");
var chunkSize:int = 5;
this.tileMap = BlockUtilities.CreateBlockMap("tiles", Vector3.one, chunkSize, chunkSize, BlockMap.GrowthAxis.Forward);
// this.tileMap.transform.position = b.min;
b.size = Vector3(30, 30, 5);
var block:Block = null;
for (var x:int = 0; x < b.size.x; x++) {
for (var y:int = 0; y < b.size.y; y++) {
for (var z:int = 0; z < b.size.z; z++) {
if (TileIsWall(Vector3(b.min.x + x, b.min.y + y, b.min.z + z))) {
block = GameObject.Instantiate(blockPrefab).GetComponent(Block);
BlockUtilities.AddBlockToMap(this.tileMap, block, false, 0, false, x, y, z, false, true);
}
}
}
}
var randomiseInitialMap:boolean = false;
BlockUtilities.RefreshMap(this.tileMap, randomiseInitialMap);
This more or less works if I create the block map setting the growth axis to “Up”, but I can’t figure out why it won’t work the other way. Is it just a bug in Tidy Tile Mapper?