I need to create a big 100x100x100 cube made out of smaller 1x1x1 cubes and then smash it into peaces.
I understand, that I only need to create as much mini cubes as I need to cover the surface, but I don’t know what is the best method to adding additional cubes after the surface ones are destroyed/removed.
The mega-cube you describe would have one million cubes. There is no way Unity will run reasonably (at all???) with a million game objects. Just the sides will have around 60,000 cubes. If the cubes have no scripts and a light-weight shader, you might be able to get reasonable performance out of 60,000 cubes on a desktop.
If you really needs this, search out references on Unity Answers and elsewhere to Voxels and Minecraft. The concept is building multiple cubes out of a single mesh. Even then you’d need 250+ meshes each with 4K of cubes in order to get your million cubes.
I did mention in my problem that : "I only need to create as much mini cubes as I need to cover the surface". So instead of having a million cubes i would only have (100 + 90 + 90 + 90 + 90 +60? = 500 cubes). My question was/is what is the best way to add additional cubes after the surface ones are removed
You create teh mesh by code, like Minecraft clones do. RobertBu already mentioned Voxels and MC. So If the surface cubes are recmoved, you would recreate the mesh(es) to make the next layer.
I did mention in my problem that : "I only need to create as much mini cubes as I need to cover the surface". So instead of having a million cubes i would only have (100 + 90 + 90 + 90 + 90 +60? = 500 cubes). My question was/is what is the best way to add additional cubes after the surface ones are removed
– Oh_my_gothYou could use a particle effect, make a spritesheet with several frames of a rotating cube.
– AlucardJay[This thread][1] used to be some sort of reference to people trying that. [1]: http://forum.unity3d.com/threads/after-playing-minecraft.63149/
– Andres-Fernandez