- Edited
Adding new JSON data to an existing project?
I've been working on a bunch of assets that will eventually be combined in Unity. This is my first time using Spine, starting maybe two weeks ago.
There ill eventually be a ton of outfits and parts that Unity will need to sort through. It's a lot for me to sort through, so I decided to export each outfit individually. This gives me a bunch of different JSON files that contain the placement information for the parts. Unfortunately, Soine only seems to accept one JSON file at a time. Without that information, I have to lay the outfit parts manually over the body which is so tedious that I can't believe there's not a better way.
I could go back into the Photoshop file and export everything together, leaving me with one massive, messy file, but that doesn't seem like the right solution either. Especially since, down the line, if I want to add even more pieces I'll still be facing the same problems. There's got to be a way to add more JSON data, right? I'm pretty sure I'm missing something.
Any help would be appreciated!
Hello Grimbot,
There are two different solutions to your problem.
First, you can of course create one big Photoshop file, which does not have to be messy at all, expecially since the PhotoshopToSpine script got updated today, and it has a bunch of amazing features that can be of help. (you have to re-download the launcher and you can find it into your Spine installation folder)
Second option, you can import the new assets on a separate skeleton in the same project, then you simply drag the attachments to your first skeleton and you need to reparent them to be done.
Please keep in mind that the json data that you export from photoshop to spine is not the same json data that you feed to spine, which you can obtain by exporting your project from spine instead.
To know more about how the script works here's the link: Images - Spine User Guide: Photoshop while for the new features just click help
in the script dialogue in Photoshop.
And here's more about export: Export - Spine User Guide
If you have an arbitrarily large number of "equips" or customization, you don't need to have them all in Spine. In fact, too many of them would make the skeleton and the resulting exported assets very cumbersome to work with.
You just need "templates attachments" in Spine— only the necessary attachments that can represent all the possible sizes and shapes. And then you can import and combine the rest in Unity. "The rest" being all the variations that fit into those templates you included in your skeleton data.
There's work-in-progress documentation on this workflow here: https://github.com/pharan/spine-unity-docs/blob/master/Mix-and-Match.md
We hope to add more images and gifs to illustrate it better.
All super helpful! I'd tried dragging assets over from another project, but I never tried the "New Skeleton" selection. It looks like I'm on the right track already. I'll check out the new script too.
Thank you!
Erikari wroteFirst, you can of course create one big Photoshop file, which does not have to be messy at all, expecially since the PhotoshopToSpine script got updated today, and it has a bunch of amazing features that can be of help. (you have to re-download the launcher and you can find it into your Spine installation folder)
You can also always find the latest scripts here:
spine-scripts/PhotoshopToSpine.jsx at master · EsotericSoftware/spine-scripts
My Spine version has a different script named "LayersToPNG" - is that an older version?
I installed the "PhotoshopToSpine" script from github but when I run it I get an error saying the "Select Command is not available". Bug?
Yep, "LayersToPNG" is the previous version (:
Another user reported this too, we're investigating (: for now maybe try selecting a layer before exporting, if you haven't?
The "select command" bug has been fixed on GitHub.