Imagine I have 10 characters in Unity. When I change the skeleton graphics (UI) at runtime, parts of other characters' skins appear, distorting the avatar's appearance. What should I do?"
Unity skin parts visiable when i change skin.
When using SkeletonGraphic
in Unity, it's important to ensure that all active attachments are on the same atlas page texture at any time, as SkeletonGraphic
is limited to a single atlas texture. This limitation is due to Unity's Canvas Renderer not supporting multiple submeshes or materials. To resolve the issue of parts of other characters' skins appearing, you can either switch from SkeletonGraphic
to SkeletonAnimation
, which does not have this limitation, or ensure that your skins are repacked to a single atlas texture at runtime. This can be done by following the guidelines in the spine-unity runtime documentation for setting skins.
@meanwhile While correct, Spinebot failed to mention that you can also enable Advanced - Multiple CanvasRenderers
to allow mulitple atlas textures at SkeletonGraphic
.
See the documentation here:
https://esotericsoftware.com/spine-unity-main-components#Parameters
https://esotericsoftware.com/spine-unity-main-components#SkeletonGraphic-Component