• Runtimes
  • [Unity, TK2D] Skins not displaying in simplest possible case

  • Изменено
Related Discussions
...

So I set up my first character, did some animations, got everything working in Unity with the current versions of Spine, Unity, TK2D, and the spine runtimes. Worked a charm.

So I decided to add start adding skins to this test rig. Went about adding all the skin placeholders and sets of images and attaching those. Export again and go through the workflow (creating atlases, skeleton data, etc). This time nothing displays. There's an option to toggle between the skins on the Spine SkeletonAnimation object, but neither show anything. I tried repeating steps over and over and tried flattening the directory structure for the images. Nothing worked.

So I went back to the absolute basics. 1 bone, 2 skins (1 image each). Nothing displays. I delete the skin placeholder and attach an image to the bone's slot and export again and it displays.

Thanks in advance

Managed to get skins working. First I tried importing the goblin example and that was fine. I noticed that one key difference was that the goblins had images in the default skin slot (the weapons). Placing something in a default skin slot caused my most basic example to display.

However a second issue arose that wasn't consistent with the goblin example. The file names for the various parts of the skins in the goblin example are the same (and differentiated by folder). In the tk2d atlas they're appended with a number for each recurrence of a filename. That seemed to work in the goblin example but not for me. I had 2 heads with the same filename in different directories. When switching the skins on the Spine SkeletonAnimation object the first head showed in both instances. So I prefixed the filenames and that worked.

tl;dr:
-had to have a texture in a default image slot to get anything to display
-had to differentiate the skin filenames to get the various skins displaying properly.

You shouldn't need an attachment in the default skin. Maybe you were having this issue instead:
http://esotericsoftware.com/spine-using ... in-changes

I guess that is a limitation of the tk2d atlas stuff, so you'll have to be careful with how you name your images. Sorry!