• Unity
  • Spine import fails to create SkeletonData

Hi, I've found what appears to be a bug in the latest version of Unity and the Spine unitypackage version.

I copied the dragon.png dragon2.png dragon.json and dragon.atlas.txt file into another folder from the examples folder. It generates the atlas and material files correctly but no SkeletonData file.

Is this a known issue? Is it because of it using multiple textures in a single atlas?

I found this bug while trying to import my own animation which also failed silently so I tried it with the dragon example and found the same issue.

Unity 5.6.2f1
spine-unity-3_6-2017-06-24.unitypackage

Cheers,
Daniel

Related Discussions
...
  • تم التحرير

I just tried copying a few folder with just dragon.json, dragon.png, dragon2.png, and dragon.atlas.txt.
It worked just fine. Couldn't repro a problem.

Is there anything else about your setup you can tell us?
Note that you can also try right-clicking the json and choosing "Reimport" to force it to try to generate the SkeletonDataAsset. It may also show a useful error in the console.

There is no error in the console, I also tried reimporting like you said.
Oh and this is on a mac. A friend of mine could not reproduce it in Windows.
Is there a log saved anywhere that could tell me why it did not generate the skeleton data?

Oh and I reproduced this in a clean new project with only the unity plugin installed.

Cheers,
Daniel

That's strange that it would be OSX specific.

There wouldn't necessarily be a log if it just ignored the json, since jsons could be in any format. Otherwise, all messages go to the Unity Console panel.

Is it possible you haven't configured unity to recognize the altas.txt and .json files correctly on your mac unity build, but you did so on the PC?

For now while we investigate, you should be able to duplicate an existing SkeletonDataAsset and just change the field values, or create new ones manually by choosing Project Window > Create > Spine > SkeletonData Asset and filling in the Skeleton Json and AtlasAsset fields. This used to be the way to do it before the auto-ingester was implemented.

There was a quick fix in the latest runtime to reallow filling the fields with Unity's asset picker window, but it should also work just fine either way if you drag the json and AtlasAsset into the correct fields.


26 Jun 2017 8:23 pm


@Xelnath. I don't think there should be anything to set up in that regard. I don't even think that's an option you could disable even if you wanted to. Could be wrong...

Thanks for the tip! I'll try that out.

Another few pieces of the puzzle:

  1. I unified line ending symbols in windows / mac / linux versions to rule that out and none of them work
  2. Other spine animations work fine, the multi-texture ones are currently the only ones failing but it might be a coincidence that they are using multiple textures
  3. I didn't do any special configuration of the plugin, just installed it in a clean unity project and copied the dragon files into a subfolder, went back to unity and it imported the atlas, created materials, etc. Just the skeleton data file is missing.

26 Jun 2017, 06:49


Hi! So doing it the way you described fixed the problem for me. I noticed that in my json file (a very old export), the entire ""skeleton": { "hash": "n52V4NfwL79zUxGmWJVMWUJgUhw", "spine": "2.1.27", "width": 519, "height": 497, "images": "" }," line was missing btw so doing it this way told me the json file was invalid (a line that is not printed to the console when auto imported).

Thanks!

Ah, that's right.

If it doesn't detect the "skeleton" node, Spine-Unity's editor utilities assumes it's a json used by some other plugin, and ignores it completely. We had a lot of problems before where it would try to read and parse any kind of json as a Spine Skeleton json.

Was this information added "recently"? This export might be a year old or more. But it feels to me like this information should always have been part of the format?

I think that info was added around a 2.x version. If you had a 1.x or even a 2.0 export maybe, it likely didn't have it.

Ok that explains it. This is an older test project that I just wanted to play around with in Unity (before it was running in another engine).

Thanks!


28 Jun 2017, 19:39


Awesome support btw, you guys rock!