Kanbaru

Spine runtime library version: 3.6
Unity editor version: 2017.4.0f1(x64)
Issue: Spine animation rendering order incorrect.

I have set the order of multiple pictures in spine,
In Unity, I only use one Skeleton Animation component to render it.

捕获.PNG


GIF.gif


But when I render multiple identical objects or different objects at the same time, rendering errors occur.

GIF3.gif


Even our boss animation has this problem too.

---

GIF5.gif

GIF6.gif
You do not have the required permissions to view the files attached to this post.
Kanbaru
  • Posts: 2

Pharan

This is a known bug with Unity when your MeshRenderer has more than one material. Sorting breaks when it tries its best to batch materials.
It's been several versions and they still haven't fixed this.

But you have two options as a workaround:
Option a. Make sure your skeleton uses only one texture and material.
Option b. Add a Sorting Group component to each Spine GameObject.
User avatar
Pharan
  • Posts: 5366

Kanbaru

Thank you :)
I added the Sort Group component, it works!
Kanbaru
  • Posts: 2

IndieDoroid

Pharan wrote:This is a known bug with Unity when your MeshRenderer has more than one material. Sorting breaks when it tries its best to batch materials.
It's been several versions and they still haven't fixed this.

But you have two options as a workaround:
Option a. Make sure your skeleton uses only one texture and material.
Option b. Add a Sorting Group component to each Spine GameObject.
I did not know about sorting groups! Very awesome. Thanks @Pharan!
User avatar
IndieDoroid
  • Posts: 46


Return to Unity