Compress a cubemap texture.
Use this method to explicitly compress a cubemap texture into the specified format.
Unity does not support the compression of textures into signed EAC formats.
Additionally, only the following formats are supported if the texture to compress uses non-power of two (NPOT) dimensions and has a mipmap:
The texture is left unchanged if Unity is unable to compress it.
using UnityEngine; using UnityEditor;
public class CompressCubemapTextureExample : AssetPostprocessor { // Automatically Compress all imported cube map textures to the project to RGB24 void OnPostprocessTexture(Cubemap t) { EditorUtility.CompressCubemapTexture(t, TextureFormat.RGB24, TextureCompressionQuality.Normal); } }