hi all:
I want to copy the Material’s textures in one texture2d, but i can’t find any API can do this, because my Material use Multi-texture and I want to save these Texture as a png Texture and send the png to www,then our server can use this png
one the same modle,
You can get textures from a material by name using the GetTexture function. Having got them, you can create a new Texture2D large enough to hold all the separate textures and use GetPixels and SetPixels to copy the pixel data from one texture to the other. Finally, you can convert this texture to PNG using the EncodeToPNG function (in fact the doc page for this function has some example code you will probably find useful).