• RuntimesGodot
  • GDExtension 对汉字有些兼容性问题

① 若骨架名称包含中文,则 SpineSprite 节点的 skeleton_data_res 属性被指定该 skeleton data 时,整个 Godot IDE 都会崩溃

② SpineBoneNode 这类可选骨骼的节点,其骨骼列表会显示中文为乱码


我在使用最新的 GDExtension (spine-godot-extension-4.2-4.3-stable),并且在 Godot 4.3 和 4.4 中都测出了上述问题

Related Discussions
...

在使用 spine-godot 时,GDExtension 对于包含中文字符的骨架名称可能会导致一些兼容性问题。具体来说:

  1. 如果骨架名称包含中文字符,当在 Godot 中为 SpineSprite 节点的 skeleton_data_res 属性指定相应的骨架数据时,可能会导致整个 Godot IDE 崩溃。这可能是由于字符编码问题导致的。

  2. 对于 SpineBoneNode 这样的节点,其骨骼列表中显示的中文字符可能会出现乱码。这同样可能是由于字符编码不兼容所引起的。

为了避免这些问题,建议在命名骨架和相关资源时尽量使用英文字符,或者确保在所有相关工具和环境中使用一致的字符编码设置。

为了可读性和方便管理,我常需要使用中文来命名骨骼,所以希望这个问题能得到解决
先行感谢 Spine 团队和 spine-godot 相关参与者的付出 😃

  • Misaki がこの投稿に返信しました。
  • Nate が「いいね」しました。

    kBlankii Sorry for the inconvenience! We would like to be able to support Chinese in a future version, so could you please provide us with a Spine project to test this? It is sufficient if you only send us a Spine project that containing some Chinese named bones and slots without images. We will create an issue ticket as soon as we receive it.

    • kBlankii がこの投稿に返信しました。

      Misaki

      chinesecharactertest.zip
      1kB

      Sure thing! thanks for the help :p

      • Misaki がこの投稿に返信しました。
      • Misaki が「いいね」しました。

        kBlankii Thank you for providing the Spine project for testing! I have tested with it and have confirmed that some combinations can reproduce the problem you mentioned and some combinations cannot.

        I was able to reproduce the crash with our Godot 4.3 custom build, but when I installed the GDExtension on Godot 4.3 downloaded from Godot's official website, it did not crash and the animation played correctly.
        The following are the states of the Spine and Godot editors when tested:

        I will continue to investigate the difference between crashing and not crashing, but for now I just wanted to let you know as soon as possible that you may be able to use Chinese text in some combinations without waiting for our updates. We will let you know if we find anything else.

        After further testing, I found that at least the following were not true, as far as I could tell:

        ① 若骨架名称包含中文,则 SpineSprite 节点的 skeleton_data_res 属性被指定该 skeleton data 时,整个 Godot IDE 都会崩溃

        The important cause is apparently the inclusion of Chinese in the animation names, and it does not matter if Chinese is used in the skeleton bone names, slot names, or image file names used for attachments.

        In my previous reply I said that the results were different between those using the GDExtension and our spine-godot custom build, but it seems that this is just because the updated skeleton data was not loaded properly within Godot, and the results were the same in both cases. I created an issue ticket to fix this:
        EsotericSoftware/spine-runtimes2788
        You can subscribe to this issue ticket to receive notifications when there is any progress on this issue.

        • kBlankii がこの投稿に返信しました。

          Misaki
          谢谢你的处理!

          但实际情况与你的描述还是有些偏差。
          方便起见,我在此提供一套能够完整还原这一问题的环境,
          其中包含了 Spine 和 Godot 项目:MEGA.NZ 下载 (这里没法上传 >8MB 的文件)

          主要偏差来自

          The important cause is apparently the inclusion of Chinese in the animation names, and it does not matter if Chinese is used in the skeleton bone names, slot names, or image file names used for attachments.

          但在这套有问题的环境中,并不包含中文名动画。带中文的就只有 插槽、骨骼、骨架、图片文件

          我已经在 Godot 项目中包含了有问题的 SpineSkeletonDataResource,将其拖拽进 SpineSprite 节点的 skeleton_data_res 空槽中,就会导致 Godot 崩溃。

          该环境所使用的 Spine 版本为 4.2.40 Pro,
          Godot 版本为 4.4.stable(官方版本)
          spine-godot 版本为 spine-godot-extension-4.2-4.3-stable(GDExtension 版本)