ES2.SaveImage
public static void SaveImage(Texture2D image, string path)
Parameters
[table th=”0″]image,”The Texture2D we want to save as a PNG image.
path,”The path of the PNG file we want to create. Should have the extension .png.“
[/table]
Description
Saves a Texture2D as a PNG file.
Note: The file must have the extension ‘.png’.
C#
// Save the texture assigned to the Material of this object ES2.SaveImage(renderer.material.mainTexture, "C:/Users/User/MyImage.png");
JS
// Save the texture assigned to the Material of this object ES2.SaveImage(renderer.material.mainTexture, "C:/Users/User/MyImage.png");