- Изменено
[Unity] I made a free tool to aid Spine/2D Toolkit imports
If you're using Spine and 2D Toolkit together in your Unity project, you've probably found that the process of importing your stuff and manually setting up atlases and skeletons can get a little tedious. I've certainly found that to be the case while working on Legacy of the Elder Star, so I created a simple editor extension to automate the process. It's called SpineAutoImport and I just released it today for free on GitHub.
Usage is simple:
Export the Spine skeleton into the Unity project as a JSON file. Un-check the "Create Atlas" option.
Copy the skeleton's image attachments into the same location as the JSON file.
In Unity, right-click the folder which contains your exported assets and choose Spine/Import Folder (tk2d).
The tool automatically generates a tk2dSpriteCollection and a SkeletonDataAsset for each skeleton JSON it finds in the target folder, and any unreferenced image attachments are automatically cleaned up. The tk2dSpriteCollection configuration is set automatically, and you can change the default configuration in the Unity editor preferences in the Spine Import section.
I also posted a quick video tutorial if you're into that sort of thing.
If you're not using 2D Toolkit in your Unity project then this tool won't work for you. This is only for projects that use Spine and 2D Toolkit together. I do realize that's a little... esoteric. 8) But hopefully at least a few people will find it useful.
P.S. If you find a bug or want to make some improvements, pull requests are appreciated!
Erm... thanks. It looks like you built this on top of the now antiquated Spine-TK2D package. The main Spine-Unity package now supports TK2D through compiler directives. Just FYI.
I wasn't aware of that change. I'll look into it.