Combining meshes and generation of levels

Hey! I’m trying to create a automatic level generator, so that you never play the same level twice.

My first thought was to create the 3D scenario in “blocks” that could be combined to form a path. As the game will be “on-rails”, creating a linear path is enough.

Since using multiple materials for a tiled texture effect will make the borders of each “block” strange when combined, can I use the same material for the combined mesh and still retain the tiled effect of the texture?

You could do this by using the same texture for each block, but varying each block’s UV coordinates to reference a different region of the texture. Say if you had three types of tile, you would have three different regions on the tile texture, each representing a different tile. Then, when you combine the meshes, they will all be able to use the same material.