Hi
I want to read the pixels of a texture and then write these to a jpg file then then import this jpg back into Unity as a texture. Is this possible?
Hi
I want to read the pixels of a texture and then write these to a jpg file then then import this jpg back into Unity as a texture. Is this possible?
Like a screenshot?
If yes, look at Texture2D class to generate the texture :
texture.ReadPixels and texture.Apply();
then you have to encode your texture in a byte table to write it in a jpg file. For that I use un php script.