• RuntimesUnity
  • Combining Unity Meshes of Multiple Skeletons

Hello,
I know I saw a post briefly referencing this, but I can't for the life of me find it 😛

I am aiming to reduce draw calls in Unity, through either Dynamic Batching or GPU Instancing. I am using the latest stable Spine Pro version & Unity 2022.3.

I have combined all of my skeleton textures to one Atlas, and using one Material. This alone did not impact my high draw calls.

From what I understand, I also need to combine the Unity meshes of the many Spine objects as well. Which led me to look at this asset:

Skinned Mesh Combiner

Disclaimer - I don't expect anyone to spend time researching this! But I thought I would ask, in case someone has insight:

Will this Skinned Mesh Combiner work with Spine Skeletons?

    Related Discussions
    ...

    nd_nomad Will this Skinned Mesh Combiner work with Spine Skeletons?

    No. Spine is not using a SkinnedMeshRenderer but a normal MeshRenderer, and the mesh is updated each frame. GPU Instancing makes no sense with Spine Meshes for the same reason.

    If your skeletons are not batched automatically by Unity's dynamic batching system, there is something else going wrong and preventing batching.

    Which exact version of the spine-unity runtime (name of the unitypackage, also listed in Assets/Spine/version.txt, or version in the Unity Package Manager) are you using? Also, which render pipeline are you using in your project?

    7 jours plus tard

    Thank you Harald!

    Good to know how the Skeleton Meshes are updated, I misunderstood that aspect. I am using spine-unity-4.1-2023-11-28 runtime package, with the Spine URP add-on and Unity Universal Render Pipeline.

    I was able to get Dynamic Batching working.

    I didn't take good notes unfortunately 😛, but I'm 99% sure I had both SRP & Dynamic Batching enabled in my Universal Render Piptline Asset settings, which can cause batching to break if I understand correctly. In any case, choosing either option individually caused dynamic batching to work.

    For others interested, a Unity Rep advises to never choose the Dynamic Batching option, and use only SRP Batching:
    Batching does not work

    Thank you again Harald!

    Glad to hear you've figured it out, thanks for getting back to us! 🙂