yuanjiashun

我想在spine动画里面一个篮子里面添加几个图片,像夹心饼干一样挂载在spine的骨头上,现在可以用multiple canvasRenderers来实现这个效果,但是发现在位移和缩放spine的父节点或者spine的根节点的时候spine发生了错位的问题
You do not have the required permissions to view the files attached to this post.
yuanjiashun
  • Posts: 8

Harald

我不确定我是否正确理解了您的问题,不幸的是自动翻译不是很清楚。

您的意思是您启用了Advanced - Multiple Canvas Renderers,然后在缩放SkeletonGraphic游戏对象或其父对象时在渲染器处遇到偏移? 您确定没有移动或缩放子 SkeletonSubmeshGraphic 渲染器吗?

您发布的第一张不正确的图片看起来好像您禁用了Advanced - Multiple Canvas Renderers,并且您的骨架使用了多个图集页面纹理(多个.png文件),这是正确的吗? 请注意,将单个 CanvasRenderer 与需要多个图集页面纹理的图集一起使用时,渲染将不正确。
-----
I'm not sure I understood your question correctly, unfortunately the automatic translation was not very clear.

Did you mean you enabled Advanced - Multiple Canvas Renderers and then encountered offsets at the renderers when scaling the SkeletonGraphic GameObject or its parent? Are you sure that you didn't move or scale the child SkeletonSubmeshGraphic renderers?

The incorrect first image that you have posted looks as if you have disabled Advanced - Multiple Canvas Renderers and your skeleton uses multiple atlas page textures (multiple .png files), is this correct? Please note that rendering will be incorrect when using a single CanvasRenderer with an atlas that requires multiple atlas page textures.
User avatar
Harald

Harri
  • Posts: 3575

yuanjiashun

通过反复测试发现如果在canvas中使用了pixel Perfect,就会出现那个花屏问题,如果不勾选则不会出问题

---

平常动画是没有问题的,但是只要我执行了transform的move动画或者缩放就会出现图上的花屏问题,我使用的spine版本是3.8

---

https://github.com/DarkYuanJs/SpineTest.git 工程地址
You do not have the required permissions to view the files attached to this post.
yuanjiashun
  • Posts: 8

Harald

感谢分享复现Unity项目,我们现在可以复现问题了。

我在这里创建了一个问题票:
https://github.com/EsotericSoftware/spine-runtimes/issues/1991
我们会在提供错误修正后立即通知您。
-----
Thanks for sharing the reproduction Unity project, we can now reproduce the issue.

I have created an issue ticket here:
https://github.com/EsotericSoftware/spine-runtimes/issues/1991
We will let you know as soon as we have a bugfix to offer.
User avatar
Harald

Harri
  • Posts: 3575

yuanjiashun

ok,期待官方大大的更新
yuanjiashun
  • Posts: 8

Harald

这个问题似乎只出现在 3.8 运行时中,而不再出现在 4.0 中。
这个在 4.0 分支上的提交修复了这个问题:
https://github.com/EsotericSoftware/spine-runtimes/commit/214c778bac7563ef695ffed11707f9d8af316ab7

不幸的是,我们无法将此修复正式应用于 3.8 分支,因为它会破坏兼容性。
我们准备了一个错误修复包作为附件,它替换了 SkeletonGraphic 文件并添加了一个新的 SkeletonSubmeshGraphic.cs 文件。 您可以将此补丁应用于现有的 3.8 安装(在目录 spine-unity\Assets\Spine\Runtime\spine-unity\Components 中)。

应用补丁后,您需要禁用Advanced - Multiple Canvas Renderers并点击Trim Renderers以清除旧的有问题的RawImage游戏对象。 之后,您可以重新启用“高级 - 多个画布渲染器”,应该会看到问题已解决。
-----
This issue seems to be only present in the 3.8 runtime but no longer in 4.0.
This commit on the 4.0 branch fixes the issue:
https://github.com/EsotericSoftware/spine-runtimes/commit/214c778bac7563ef695ffed11707f9d8af316ab7

Unfortuantely we cannot apply this fix to the 3.8 branch officially since it would break compatibility.
We have prepared a bugfix package as attachment which replaces the SkeletonGraphic file and adds a new SkeletonSubmeshGraphic.cs file. You can apply this patch over the existing 3.8 installation (in directory spine-unity\Assets\Spine\Runtime\spine-unity\Components).

After applying the patch you need to disable Advanced - Multiple Canvas Renderers and hit Trim Renderers to clear the old problematic RawImage GameObjects. After that you can re-enable Advanced - Multiple Canvas Renderers and should see the problem fixed.
You do not have the required permissions to view the files attached to this post.
User avatar
Harald

Harri
  • Posts: 3575

yuanjiashun

感谢,已经测试过了,3.8是可以用的
yuanjiashun
  • Posts: 8

Harald

很高兴听到这个消息,谢谢你让我们知道。
Glad to hear, thanks for letting us know.
User avatar
Harald

Harri
  • Posts: 3575

yuanjiashun

但是我还发现了一个后续的问题,如果把这个spine放到unity的UGUI的Scrollview里面,会出现错位问题,不论是3.8还是4.0版本都有这个问题
You do not have the required permissions to view the files attached to this post.
yuanjiashun
  • Posts: 8

Harald

我们还不能重现这种错位问题。 你确定你没有移动部件的任何RectTransforms吗? 如果您没有移动它们,能否请您向我们发送一个仍然显示此问题的最小 Unity 项目? 您可以将其作为 zip 包发送至 contact@esotericsoftware.com。 还请简要提及此论坛 URL,以便我们了解上下文。
-----
We could not yet reproduce such a misalignment issue. Are you sure that you haven't moved any of the the RectTransforms of the parts? If you didn't move them, could you please send us a minimal Unity project that still shows this problem? You can send it as a zip package to contact@esotericsoftware.com. Please also briefly mention this forum URL so that we know the context.
User avatar
Harald

Harri
  • Posts: 3575

yuanjiashun

你可以更新下我的 https://github.com/DarkYuanJs/SpineTest.git 工程地址,功能我已经添加上去了
yuanjiashun
  • Posts: 8

Harald

感谢您发送复制包。 不幸的是,在检查了提供的示例场景后,我们不太明白您所说的“未对齐问题”是什么意思。 也许机器翻译在这里不清楚。

您能否详细描述一下您希望看到的内容以及您看到的内容? 我们看到四个框并假设它们应该位于相同的 x/y 位置。 但是,四个BoneFollowerGraphic目标骨骼qiqiu_guadian1-qiqiu_guadian4的骨骼位置显示了四个不同的位置。 结果,每个框的偏移量正是我们期望的位置。

bone-offsets-in-skeleton.png

-----
Thanks for sending the reproduction package. Unfortunately after having checked the provided example scene, we don't quite understand what you mean by the encountered "misalignment problem". Perhaps machine-translation was unclear here.

Could you please describe in detail what you expect to see and what you see instead? We see four boxes and assumed that they are expected to be on the same x/y position. However your bone positions of the four BoneFollowerGraphic target bones qiqiu_guadian1-qiqiu_guadian4 show four different locations. As a result, the offset of each box is exactly where we would expect them to be.
You do not have the required permissions to view the files attached to this post.
User avatar
Harald

Harri
  • Posts: 3575

yuanjiashun

这个bug只有在unity运行的时候才会出现,编辑器模式是没有问题的,unity运行时发现部分图片是没有渲染的
yuanjiashun
  • Posts: 8

Harald

感谢您的澄清,现在我们可以明白您的意思了。 一旦我们弄清楚出了什么问题,我们就会回复您。

通常,请始终预先提供此类信息。 提前回答以下问题会有很大帮助:
  • 你希望看到什么?
  • 你看到了什么呢?
  • 我们如何重现这种行为?
这使我们俩都免于浪费时间来追踪错误的问题。
-----
Thanks for the clarification, now we can see what you mean. We will get back to you once we've figured out what's going wrong.

In general, please always provide such information up front. Answering the following questions in advance helps a lot:
  • What do you expect to see?
  • What do you see instead?
  • How can we reproduce this behaviour?
This saves us both from wasting time on tracking down the wrong issue.

---

在进一步分析该项目后,我注意到您没有应用我在上面的帖子中提供的 SkeletonGraphic 错误修复 zip 包。 您的 SkeletonGraphic.cs 文件仍然是未修改的旧文件:
https://github.com/DarkYuanJs/SpineTest/blob/master/SpineVersion3.8Text/Assets/Spine/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs

所以请应用这个bugfix包,覆盖SkeletonGraphic并添加Internal/SkeletonSubmeshGraphic.cs。 然后您需要删除并重新启用所有子网格部件,例如 通过禁用Enable Separation并点击Trim Renderers,这将删除部件渲染器。 然后再次启用Enable Separation。 那么你应该有例如 Renderer0 带有 SkeletonSubmeshGraphic 组件,而不是 RawMesh 组件。
-----
After analysing the project further, I noticed that you haven't applied the SkeletonGraphic bugfix zip package that I have provided in a posting above. Your SkeletonGraphic.cs file is still the old unmodified one:
https://github.com/DarkYuanJs/SpineTest/blob/master/SpineVersion3.8Text/Assets/Spine/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs

So please apply this bugfix package, overwriting SkeletonGraphic and adding Internal/SkeletonSubmeshGraphic.cs. Then you need to remove and re-enable all submesh parts, e.g. by disabling Enable Separation and hitting Trim Renderers, this will remove the parts renderers. Then enable Enable Separation again. Then you should have e.g. Renderer0 with a SkeletonSubmeshGraphic component, not a RawMesh component.
User avatar
Harald

Harri
  • Posts: 3575

yuanjiashun

你们可以最新的spine版本4.0和添加过那个bugfix包,问题依然存在的!这个应该是你们之后修复的问题。我现在在使用过程中用其他方式来规避这bug了
yuanjiashun
  • Posts: 8

Harald

不幸的是,当我们应用错误修复包或使用spine-unity 4.0 时,问题就消失了。 一旦在部件渲染器中不使用RawImage,问题就在我们的测试中消失了。 能否请您向我们提供一个使用spine-unity 4.0 并仍然显示此问题的复制项目,然后我们将很乐意解决此问题。
-----
Unfortunately the problem was gone when we either applied the bugfix package, or used spine-unity 4.0. As soon as no RawImage was used at the part renderers, the problem was gone in our tests. Could you please provide us with a reproduction project that uses spine-unity 4.0 and still shows this issue, then we will be happy to fix this.
User avatar
Harald

Harri
  • Posts: 3575


Return to Unity