- Home /
How do I combine faces of cubes?
I'm trying to combine the faces of many 1x1 unit cubes into a bigger cube, so that it renders much faster than they would seperately but so that when one cube is removed it will still render the 'chunk' missing from the bigger cube.
I am also hoping that this would help to render the semi-transparent cubes together rather than individually where you can still see the other faces of the other cubes still being rendered, not the ideal effect for a large semi-transparent block made from many smaller prefabs.
Answer by Jesse Anders · Feb 08, 2011 at 01:56 PM
Check out the procedural mesh examples on the Unity site, and perhaps also search Unity Answers and the forums for 'minecraft' (as this sounds like essentially the same problem, and the topic has been discussed quite a bit here and on the forums in the past).
Thanks, I had a look around and found ScriptReference:$$anonymous$$esh. Though I'm unsure how to make many clones of a prefab into a single mesh. Would I possibly just copy all the vertices and triangles from said cubes into the new single mesh?
There's lots of different ways you could do it. If the goal is to have a continuous grid and not to be able to see cubes behind the surface-level cubes, I'd actually probably maintain a dynamic mesh that only consisted of the exterior (exposed) faces of the cubes. It would take some work, but might give you the best results. (Again, assu$$anonymous$$g that you only want to see the exposed faces.)
how come you gave him a good answer but not me jesse anders its pretty much the same question as $$anonymous$$e.
@unknown: Are you asking why I didn't answer a similar question of yours? Whatever you're referring to, I can assure you it wasn't intentional :) What question are you referring to exactly?
@Jesse Anders how to make a line go around a cube and place the cube on the floor a building system for example click the link
Your answer
![](https://koobas.hobune.stream/wayback/20220613103341im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Transparency issues with custom shader 0 Answers
Transparency with correct culling 2 Answers
Render a GameObject/mesh to a -transparent- texture at run-time 2 Answers
Transparency not working in build 0 Answers
Transparency shader problem 5 Answers