Looking for a method of creating "Ground meshes" without adding tons of models to my project.

This is kind of an odd question and I’m not exactly sure if this is the right place to ask it, but I’ve searched all over the internet for answers and am not sure what the typical way to go about this is.

Anyway, my problem is that I’m creating a 2D orthographic style puzzle game using all 3D models. Similar to New Super Mario Bros for example. My game works very different from that, but that should give an idea of the visual style I’m going for. For most of the project so far I have been able to use prefabs to limit the amount of objects in my hierarchy and keep everything as minimal as possible. I should mention I am making this for smart phones too, so I am trying to be as optimal with resources as possible, but am looking to have between 70-100 different stages.

However, for the ground structures I will need a tons of models that are different sizes and shapes in order to create platforms that are the right size and fit into the places that I will need to place them. Is there a simple way to create terrain for this type of game that will auto-repeat textures and such? Or is the typical way to just make a ton of different structures for each stage? If anyone can point me to a tutorial or something that would be super helpful. Thanks for any help in advance.

There are several approaches possible. The first two will experience performance problems if hte number of gameobjects gets too high (in the thousands).

  1. Create the whole level as one mesh in your 3d modeling application and import it into your Unity scene. Things that move, like elevators and doors, would obviously be prefabs.
  2. Similar to the above, but every tile/cubic space is a prefab/imported mesh.
  3. Moving objects and things with scripts on them, buttons etc are prefabs, but the level geometric with walls and floors is made via procedural mesh generation, similar to games like Minecraft. You define a 3-dimensional array acting as your “world coordinate system” and depending on the data contained, at a certain position there will be a floor, slope, staris, nothing, wall, etc. Note that this is not limited to cubes, you can theoretically use any mesh data for each array position. For more information, check out the “After Playing Minecraft…” thread.