I am using the GetRepackedSkin method to repackage skins at runtime. Our game is aimed at mobile platforms and we need to use TextureFormat to reduce the size of the textures.
When I use GetRepackedSkin on textures with a custom TextureFormat, I end up with a broken texture. I did a little investigation and there is a result:
When I pass a skin with a TextureFormat.PVRTC_RGBA4 to GetRepackedSkin, an exception appears in the console:
Graphics.CopyTexture can only copy memory with the same size (src=24128 bytes dst=3016 bytes), maybe the size (src=232 * 208 dst=29 * 26) or format (src=RGBA Compressed PVRTC 4BPP UNorm dst=RGBA8 UNorm) are not compatible
When I pass a skin with a TextureFormat.PVRTC_RGBA4 to GetRepackedSkin and set textureFormat parameter to TextureFormat.PVRTC_RGBA4 I get a broken texture:
I also saw that the resulting texture does not have the TextureFormat that I was passing. I will be glad for any help.