• RuntimesUnity
  • 使用Multiple CanvasRenderers導致渲染錯誤

我使用的SkeletonGraphic 搭配 Multiple CanvasRenderers
當該物件為於某2DMask物件的子物件,並且位置是在遮罩的顯示範圍外時,
當該物件Active 為 Disable時,物件反而會被渲染出來

Related Discussions
...

恐怕機器翻譯無法正確翻譯您的消息。 您能否以其他方式描述您的問題,並分步描述如何重現問題,並分享一些屏幕截圖,顯示您的預期結果以及您看到的錯誤結果?

I'm afraid machine translation failed to translate your message properly. Could you please describe your problem in other words in a step-by-step description on how to reproduce the problem, and share some screenshots showing your expected result and what the incorrect result looks like that you see instead?

@cheng38552 Thanks for the additional info. Unfortunately we could not reproduce this issue with the latest spine-unity runtime.

i use spine-unity 4.1.xx

Which exact version of the spine-unity runtime are you using? It's the name of the unitypackage including the date, also listed in Assets/Spine/version.txt. When using the Unity Package Manager and git, it's listed in as package version in the Package Manager window. If it only reads 4.1.0 in the Package Manager, you're not using the latest version.

Unless you're using the latest package, please have a try whether updating the spine-unity runtime already resolves this issue. As usual, backup your project before updating.

If the issue persists with the latest spine-unity package, could you please send us a minimal Unity project which still shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at what's going wrong.

i use spine-unity Runtime 4.1.0
I'll try to update to see if the issue persists

i already update spine-unity Runtime to the latest version,
but the issue still exists

my unity version is 2021.3.5f1

in unity version 2021.3.28f1 the issue still exists
I already packaged the problematic project and sent it to Email
Some resources of this project are commercial secrets, please handle them properly

@cheng38552 Thanks very much for sending the reproduction project, we can now reproduce the issue. We have created an issue ticket here where you can subscribe to receive updates:
EsotericSoftware/spine-runtimes2324
We will post here on the forum once we have a bugfix ready.

For the future regarding the zip package: please do not include the unnecessary Library, .vscode and .vs directories in the package, since it increases file size from 10mb to more than 500mb. The Assets, Packages and ProjectSettings directories are all that is needed in general. Everything else is generated from it when opening the project.

@cheng38552 We have just released a bugfix for the above issue on the 4.1 and 4.2-beta branches.

New spine-unity 4.1 and 4.2-beta unitypackages are available for download here as usual:
https://esotericsoftware.com/spine-unity-download
Please let us know if this resolves the issue for you as well. Thanks again for reporting!

The issue is resolves, Thanks very much.
But I can't update my spine-unity Runtime from 4.1.0 to 4.1.16,
because I found that starting from a certain version, the Anchor presets will be forced to be set to (stretch, stretch) on the GameObject RectTransform of the Skeleton Submesh Graphic.

This behavior will cause the information I set myself to be forcibly overwritten when the size and position of the Submesh were incorrect.
This will cause many problems,so I will first correct the information according to version 4.1.16 and handle it by myself

Thanks again~

@cheng38552 Sorry to hear that the behaviour has changed in a bad way for you! Could you please describe your use case why you want to set each SkeletonSubmeshGraphic RectTransform individually instead of sharing the same RectTransform bounds of the common parent SkeletonGraphic? We would be happy to introduce a property to disable setting the child SkeletonSubmeshGraphic RectTransform bounds if it benefits other users as well. Or are you using render separation and have multiple parts renderers?

We introduced automatic copying of the RectTransform bounds from the parent SkeletonGraphic (effectively setting it to stretch) as a bugfix to prevent too small bounds at the SkeletonSubmeshGraphic objects, which led to undesired culling when the bounds are suddenly outside the camera or mask boundaries, although the parent SkeletonGraphic bounds were setup perfectly.