Examples¶
Example 1¶
In this sample we have modeled some buildings ans tile grounds and put it together in Unity to make some prefabs. We remove the tile with pattern 0-0-0-0 to reduce the connection-0 sides.
Tip: The algorithm search the new tile from only two previous tiles, then you only need to have at least some tile with pattern 0-0-X-X to fill this case
If you forget some pattern the execution will display the next message with the needed pattern
It say that you need a tile with two side without connections, make one and add it to the World tile list
Example 2¶
This sample is only to show you than Tile City Generator can work with n-connection tiles.
tileConnections variable can be edit into ProceduralWorld.cs to change the tile side connections, 3 connections by side make a lot of tiles then beware with that.
We have discarded the generation of tiles with some side without connections to obtain a more connected map.
This script generates all posible border pattern and make 1 tile for each of them