- Home /
Colour cubes after CombineMesh()
I know the title may not be completely precise, but i do have limited space up there.
Unlike a lot of people here, i build a 'game', not to make a game, but to see what is possible, and to test my own abillites. At the moment, it's just me playing around with terrain generation, like in Minecraft, made with cubes, and i've come to the phase where, the positioning is done, but the colouring is far from.
I've created small chunks, to optimize performance a little bit, with the Mesh.CombineMeshes() function, but i can't seem to get the colours set probaly, as the new chunk only used one material, and i have no idea, how to colourize them, dependant on the Y value, of the cubes.
I've tried colouring them, before combining, but with the same result. I've tried the Texture2D.PackTextures function, but now they turn grey.
The colours has been stored in a Color[,] array, so i can easily grab the right color, with the cubes position.
Thanks in advance :)
Oh, and just to clarify the scripting a little bit, i just nicked the script from grrava, so that's a starting point, for you problem solvers ;)
Your answer
Follow this Question
Related Questions
Get the color of a WebCamTexture at the click position 2 Answers
Change Color of model from Down to up! 1 Answer
Vertex coloring isn't working 2 Answers
how do i fix this error 2 Answers
How to texture an irregular (hexagon) shape (mesh) ? 1 Answer