• Unity
  • RepackedSkin problem with CopyTexture

Related Discussions
...

In AtlasUtilities:CopyTexture you use the Graphics.CopyTexture method.
This method, according to the Unity documentation, is very dependent on the type of compression, and therefore a number of problems arise when repacking the skin when the atlases are compressed.
https://docs.unity3d.com/ScriptReference/Graphics.CopyTexture.html

Graphics.CopyTexture can only copy memory with the same size (src=832 bytes dst=224 bytes), maybe the size (src=26 * 32 dst=7 * 8) or format (src=RGBA Compressed ETC2 UNorm dst=RGBA8 UNorm) are not compatible

Your observations are correct, this is the reason why we document it here in the Important Note section on the spine-unity docs pages:
spine-unity Runtime Documentation: Combining Skins

http://esotericsoftware.com/spine-unity a écrit

2. Compression is enabled: Depending on the platform, ensure that the source texture has Texture import setting Compression set to None instead of Normal Quality.

Note that it would not be reasonable to have e.g. DXT compression enabled on the source and destination textures, since this would limit copyable regions to discrete 4x4 compression blocks.

    3 ans plus tard

    Harald 我在电脑上显示的正常,但是在安卓端就会出现问题,我的角色图片变成灰色的空白图,我已经将压缩设置为无了。

    Harald 我查看了文档,但是还没解决我的问题。我在换装的时候不属于spine的外部资源可以正常显示,但是spine本身的资源显示异常,会显示成一个灰色的空图,这个问题出现在GetRepackedSkin合图操作以后,因为我会将外部sprite和spine本身的图集合并在一起优化性能.