• RuntimesUnity
  • 在播放动画时,内存中的重复材质大量增加

hjx1994 Please note that 4.3 is still a beta version, and skeleton data exported from the latest editor may not work correctly at runtime. If you are developing for production rather than testing, please use the latest stable version, 4.2.

  • hjx1994 ответили на это сообщение.
    Related Discussions
    ...

    Misaki 你好!我将版本修改为4.2后进行测试,依然会有这个问题

    Misaki 编辑器版本是4.24,运行时版本为4.2

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

      hjx1994 I see, thank you for trying the 4.2 editor and runtime! In order to identify the cause of the issue, could you please send us the minimal Spine project that reproduces the issue via email?: contact@esotericsoftware.com
      Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.

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

        Misaki 已经通过邮件发送项目,感谢帮助!

        @hjx1994 Thanks for sending the reproduction project, we received everything. We will get back to you here on the forum once we've figured out what's going wrong.

        @hjx1994 Thanks for reporting and sorry for the troubles! This was indeed a bug where mask materials were unnecessarily re-created. This has now been fixed on the 4.2 branch.

        A new spine-unity 4.2 unitypackage is available here as usual:
        https://esotericsoftware.com/spine-unity-download
        Please let us know if this resolves the issues on your end as well.

        Issue ticket for later reference:
        EsotericSoftware/spine-runtimes2848

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

          Harald 感谢!我尝试新版本后问题已解决,解决问题的速度让人惊讶,再次感谢!

          • Nate оценил это.

          Harald 你好!!!!更新后我遇到了新的问题。在使用SkeletonMecanim时,多材质的Spine在设置Mask Interaction不为None后会显示错误!
          这是我未设置Mask Interaction值的样子

          这是我设置未Visible inside Mask后,

          为了可以在编辑器中看到对象,我重新设置为None

          可以看到,我的脑袋没了 T-T。我观察只生成了一个InsideMask材质,没有为每个材质都生成InsideMask材质。

          @hjx1994 Very sorry for the troubles and thanks for reporting! Unfortunately the mask handling structures in the 4.2 spine-unity runtime is suboptimal, and fixing it one way would introduce different memory leaks, and also risking breaking existing projects. As a result I've reverted the last commit, sorry to say.

          The good news is that we have already solved this problem via a better mask architecture already in an internal dev branch, which will be released in the current beta branch alongside with threading implementation as soon as the final cleanup is done. Unfortunately it will take a bit of time still, as porting of the 4.3-beta editor changes is yet to be completed.

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

            Harald 好的,期待新版本的更新 !

            2 месяца спустя

            Hello @Harald any chance this update coming soon? 🙏

            Sorry forgot to add more info. I was hoping for the spine 4.2 runtime. I'm not sure the improved mask architecture you mentioned were only intended for 4.3.
            Meanwhile would you recommend us to not use mask interactions?

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

              influogames I was hoping for the spine 4.2 runtime. I'm not sure the improved mask architecture you mentioned were only intended for 4.3.

              This change will not be back-ported to the 4.2 branch once it's released on 4.3-beta, sorry. As I said in the above posting, fixing it one way would introduce different memory leaks, and also risking breaking existing projects. Thus this breaking change can only be implemented in a beta branch, 4.3-beta in this case.

              Meanwhile would you recommend us to not use mask interactions?

              I would not avoid mask materials just because of additional Material objects allocated. It depends on your concrete project of course, on the actual memory allocation size, whether this poses a problem or not. You could then profile on the target device whether enabling and disabling mask material usage has any impact on your measured framerate, whether it actually leads to GC hickups.