c# - How to go from TextureImporterFormat to TextureFormat? -
it's unity3d specific question, thought i'd ask here since no usefull feedback in unity forums.
in short; need corresponding textureformat
textureimporterformat
.
i'm writing assetpostprocessor
; want alter textures after they're imported, , want compress them.
so in onpostprocesstexture(texture2d texture)
function want compress texture in textureformat defined in editor (in textureimporter
), if didn't in function.
however, compression function (editorutility.compresstexture()
) expects format of type textureformat
, format can of type textureimporterformat
.
how 1 other?
or how can avoid problem alltogether?
i'm doing manually now, pain ass. since differs depending on version of unity, means change new unity update. :(
i forgot question, kinda late thought should answer anyway.
turns out misinterpreting results got. compression happens automatically after function.
i had made test see if textures being compressed after using onpostprocesstexture(), , thought weren't, are.
Comments
Post a Comment