Compress a cubemap texture.
Use this function to explicitly compress a cube map texture into specified format.
#pragma strict public class CompressCubemapTextureExample extends AssetPostprocessor { // Automatically Compress all imported cube map textures to the project to RGB24 function OnPosprocessTexture(t: Cubemap) { EditorUtility.CompressCubemapTexture(t, TextureFormat.RGB24, TextureCompressionQuality.Normal); } }
using UnityEngine; using UnityEditor;
public class CompressCubemapTextureExample : AssetPostprocessor { // Automatically Compress all imported cube map textures to the project to RGB24 void OnPosprocessTexture(Cubemap t) { EditorUtility.CompressCubemapTexture(t, TextureFormat.RGB24, TextureCompressionQuality.Normal); } }
Did you find this page useful? Please give it a rating: