How to merge meshes in script for 65536 instances of the same primitive
I'm generating 65536 identical textured 1³f cubes in a 64x64x16 configuration in preparation to carve my dungeon out from the inside via array data. Naturally, the GPU slows down to about 5fps when drawing 4096 cubes at a time. I think the solution is to merge meshes, as there is no way that one large cube 64x64 units great would be so slow.
Am I barking up the right tree? If so, could I see some example code for merging meshes please? It's a really yucky topic to try and understand as a beginner to Unity on Google. I can put all the cube references into an array if necessary, as I've gathered from the internet. Sorry for the perhaps silly question, I hope it's an easy one to answer at-least.
Thanks!
PS I'm using C#, but any code I can look at would be well appreciated!
Your answer
Follow this Question
Related Questions
Rendering performance of single large mesh vs multiple smaller meshes 0 Answers
Sprites vs texturesless Meshes - more texture memory with meshes?? 0 Answers
AA + Vertex colors = mesh face cracks/seams 1 Answer
Very thin and long cuboid/cylinder 0 Answers
Render transparent mesh over sprite 0 Answers