J
jonomidi

  • 5 мар
  • Регистрация: 18 ноя 2020

    jonomidi Based on my understanding of the Spine runtime code, it seems that texture loading is not related to the setup of the AttachmentLoader. You mentioned that Unity has a relevant example; could you tell me the name of the example?

    Spine Examples/Other Examples/Mix and Match and Mix and Match Equip are two examples showing replacement of original attachments with Attachments created from Unity Sprite images.

    @jonomidi This indeed seems to be a bug, the property currently has no effect. Unfortunately we can't include the fix in 4.2, as it is a breaking change, it will be integrated in the next 4.3-beta.

    We've opened an issue ticket here:
    EsotericSoftware/spine-runtimes2636

    You can find a manual update of the SkeletonRendererInstruction file here (also attached as comment to the issue ticket):

    skeletonrendererinstruction-fix-immutable-2636.zip
    3kB

    @jonomidi Thanks for reporting, good find, this might actually be a bug. We will investigate the issue and post again here on the forum.

    @jonomidi There is no direct equivalent available since creating a mesh attachment for an atlas region is not really reasonable.

    Instead you start from an existing MeshAttachment and copy it and set the region accordingly to your desired atlas region. There are convenience methods available here:
    AttachmentCloneExtensions.
    Note that these are also demonstrated in the example scenes Spine Examples/Other Examples/Mix and Match and Mix and Match Equip (with Unity Sprites instead of Regions to replace mesh attachment regions, but similar in use).

    • jonomidi ответили на это сообщение.
    • jonomidi оценил это.

      你可以试试看 用SPINE自带的皮肤功能来做,然后每套皮肤用到的图片 分别放在放在不同文件夹内,最后用纹理打包器(ctrl+p)来打包图片,这样每个文件夹内的图各自导出不同的纹理集 正常导出只导出二进制或者JSON数据格式 。加载的时候 程序去控制 只加载目前皮肤使用的贴图文件