Method EncodeTexture
EncodeTexture(Texture2D, ImageFormat, bool, Material)
Encodes the export texture
Declaration
protected static byte[] EncodeTexture(Texture2D texture, ImageFormat format, bool hasAlpha = true, Material blitMaterial = null)
Parameters
Type | Name | Description |
---|---|---|
Texture2D | texture | Main texture to encode |
ImageFormat | format | Image format |
bool | hasAlpha | True if the texture has an alpha channel |
Material | blitMaterial | Custom blit material |
Returns
Type | Description |
---|---|
byte[] | Encoded texture data |