绘制相互重叠的透明对象是基于光栅化渲染的普遍问题。 如果启用写入深度缓冲区(启用 ZWrite)对您来说不是一个选项,您可以使用 SkeletonRenderSeparator
组件将每个骨架网格体拆分为多个网格体:
spine-unity Runtime Documentation: SkeletonRenderSeparator
通过这种方式,您会收到每个骨架的多个网格,这些网格将独立排序。
但是,如果这真的解决了您的问题,则取决于您的场景和骨架设置。 为了正确判断情况,我们需要查看您计划执行的一些屏幕截图。
Drawing transparent objects that overlap each other is a general problem of rasterization-based rendering. If enabling writing to the depth buffer (enabling ZWrite) is not an option for you, you could split each skeleton mesh into multiple meshes using the SkeletonRenderSeparator
component:
spine-unity Runtime Documentation: SkeletonRenderSeparator
This way you receive multiple meshes per skeleton that will be ordered independently.
If this really resolves your problem depends on your scene and skeleton setup however. We would need to see some screenshots of what you are planning to do in order to judge the situation properly.