- Home /
ID multidimensional array to mesh and textures
I am making a game based on Minecraft. I have the map stored in a 3D array. Currently, I have prefabs for each block ID, and I instantiate them for each block which is visible. But even with that, if I want to run my game with a high FPS, I have to run it with bad quality.
So, to increase the performances, I would like to display only the visble faces (some faces are not visible when the blocks are visibles) and bring them together in only one mesh which will be used for the graphics and for the physics. It is my first problem.
Secondly, I need to apply the global texture from the textures of the blocks.
Thirdly, I need to be able to edit this mesh when a block is added or removed.
I know I ask you lot of things, so if you can give me only some tips, some ideas, I would be really grateful.
Thanks in advance.
Don't take this topic into account. I asked this question more than 27h ago and it was published 3h ago. So I was working on my project during a whole day, and I solved this question...