ES2.SaveImage
Parameters
path |
The path of the PNG file we want to create. Should have the extension .png. |
Description
Saves a Texture2D as a PNG file.
Note: The file must have the extension ‘.png’.
C#
1 2 |
// Save the texture assigned to the Material of this object ES2.SaveImage(renderer.material.mainTexture, "C:/Users/User/MyImage.png"); |
JS
1 2 |
// Save the texture assigned to the Material of this object ES2.SaveImage(renderer.material.mainTexture, "C:/Users/User/MyImage.png"); |