• Editor
  • 使用Clipping裁切功能的spine动画,导入unity后层级错乱

导出方式是二进制,动画文件导入unity后,原本不该被裁剪的图片也被裁剪了,spine版本是3.6.47,请问各位大佬们有没有解决方案

    Related Discussions
    ...

    在将使用Clipping裁切功能的Spine动画导入Unity后出现层级错乱的问题,可能是由于Unity的批处理器在优化绘制调用时错误地重新分组了多个骨架的附件多边形。为了解决这个问题,可以参考以下步骤:

    1. 确保在Unity中使用正确的渲染管线和着色器。如果使用的是URP(Universal Render Pipeline),请确保使用Spine URP着色器。
    2. 在SkeletonAnimation组件中启用“Advanced”选项下的“Fix Draw Order”功能,以防止URP批处理器过于激进地组合内容。
    3. 如果启用“Fix Draw Order”没有效果,可以尝试在SkeletonAnimation的GameObject上添加一个“SortingGroup”组件,这可能比“Fix Draw Order”更合适。

    此外,确保在Spine中导出时的设置与Unity项目的设置匹配,以避免导入时出现不匹配的问题。

      修修修 Hmmm, it is not clear from this information what exactly is causing the problem, but at least Spine 3.6.47 is not the final version of 3.6, so you could try updating to 3.6.53 and see if that solves the problem. Also, I am not sure what version of the spine-unity runtime you are using, but if it is an older dated version, you may want to use the latest version of the 3.6 runtime, as it is possible that a bug related to clipping may have been fixed in a patch version.

      Spinebot
      项目使用的是内置渲染管线,渲染管线这边无法调整,刚刚添加SortingGroup组件后没有解决问题,主要是使用了裁剪才导致的层级错乱,去除裁剪就不会有问题,请问还有其他的解决方式嘛

      1 个月 后

      @修修修 Sorry for the late reply. Machine translation is unfortunately not very clear. Does your issue persist, and did using SortingGroup components not resolve the issue?

      If your issue persists, did you try re-exporting the problematic skeleton from Spine Editor version 3.6.53 as Misaki suggested above? Are you using the latest version of the spine-unity 3.6 runtime from the download page here?