Hello,
I'm building an avatar atlas at runtime from loose textures and everything is working except I can't seem to get the TextureFormat parameter in GetRepackedSkin() to be used. Every time the repacked atlas is created the resulting texture will be ARGB32 uncompressed. I've tried a whole bunch of different TextureFormat options from Alpha8 to ETC2 to DXT and regardless of the option, the resulting repacked texture is ARGB 32 bit uncompressed.
I see a lot of other developers on the form are using the Mix and Match system with repacked textures but couldn't find anyone mentioning using different texture compression, just mipmaps on/off and different texture sizes.
Any ideas about what could be going wrong?
// Pseudo code with some definitions omitted
Skin newSkin = skeleton.UnshareSkin(true, true, skeletonAnimation.AnimationState);
...
// Attachments found by bone index
...
Sprite newSprite = Resources.Load<Sprite>(spriteName);
AtlasRegion newRegion = newSprite.ToAtlasRegionPMAClone(Shader.Find("Spine/Skeleton"));
newAttachment.SetRegion(newRegion);
newSkin.AddAttachment(slotIndex, componentAttachmentName, newAttachment);
skeleton.SetAttachment(componentSlot, componentAttachmentName);
Resources.UnloadAsset(newSprite);
...
// Multiple loose sprites attached to the skeleton
...
GetRepackedSkin("repacked", repackedShader, out runtimeMaterial, out runtimeAtlas, 2048, 2, TextureFormat.DXT1, false);
skeleton.SetSkin(newSkin);
skeleton.SetToSetupPose();