• Runtimes
  • Error reading ("edges": null) in Spine JSON!

Hi, all!

I got a large number of spine animation which designed by previous artist need to be reimported to current project.

However, as I found, half of the Spine Json files cannot be imported, which with ("edges": null) description in mesh-type skin.
The error in console shows "Error reading skeleton JSON file for SkeletonData asset" for all Unity version and Spine version I tried.

eg.
"body": {
"body": {
"type": "mesh",
"name": "body",
"width": 200,
"height": 200,
"uvs": [1, ……, 26],
"vertices": [2,……1],
"hull": 10,
"edges": null // this line with error in any version of Unity and Spine
}
},

That is, If I have successfully imported a Spine Json with "edges": [1,4……8] and I change this line to "edges": null, the skeletonData will have the same error as all I tested.

I tried to learn the "JSON export format" article which said mesh attachment attributes 'edges','width','height' are "Nonessential". So…

  1. Is the any version of Spine or Unity that I can import JSON with ("edges": null) , if the version is the problem?
  2. Is there any way I can calculate default 'edges' values myself, because I cannot import them to any software?
  3. Or, is that the only way to re-export ALL Spine JSON with 'edges' again? 🙁

Many thanks!

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

FWIW, you should always re-export your Spine projects after updating the Spine Runtimes. Sometimes old JSON will work with newer (or older) runtimes, but occasionally it won't. You can use the command line to export everything at once:
Export - Spine User Guide: Command line
Eg, here is a shell script (this is Mac or Linux, but can be run on Windows using Cygwin or you can write a Windows batch file):
spine-runtimes/export.sh at 3.7

Otherwise, you could modify your JSON data to remove the "edges": null or patch the runtime to not choke if edges is null. To do that, after this line:
spine-runtimes/SkeletonJson.cs at 3.7
Add:

if (list == null) return null;

I'm not sure how you have data with null edges. It doesn't look like it's possible for Spine to output that (at least not in the latest version).