Instantly build levels using a greyscale img.
This asset generates a tile map using terrain prefabs, with the height derived from a greyscale bitmap.
The size of the level is equal to the resolution of the height map – for example, a 16×16 pixel height map will make a 16×16 unit map. I recommend keeping the height map small – the example scene uses a 128×128 pixels height map which creates 16,384 prefab instances.
The gradient color map isn’t used and is commented out in the generate script. Feel free to try it. It looks good, but it creates hundreds of material instances and makes the scene very inefficient. A better way would be to map the gradient as an albedo texture across and only use one material.TileMapGenerator.zip (501 downloads)