SpineAutoImport tool now available

Today I've released SpineAutoImport, a far quicker, easier, and less error-prone way to bring Spine assets into a Unity project that uses 2D Toolkit. You can get it for free from Kickbomb's GitHub right here.

Quickstart

First, you've need to have synced the GitHub repository and copied its contents into your Unity project. You should also have a Spine file prepared and ready to import.

  1. Export the Spine skeleton into the Unity project as a JSON file. Un-check the "Create Atlas" option.
  2. Copy the skeleton's image attachments into the same location as the JSON file.
  3. 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.

Here's a video walkthrough of the process from start to finish:

So, why does this exist?

We use Spine to create the animations for Legacy of the Elder Star, and we use 2D Toolkit to manage our sprite atlases and rendering inside Unity. The standard workflow for importing Spine assets into this setup without SpineAutoImport was a bit tedious:

  1. Export the Spine skeleton into the Unity project.
  2. Copy the skeleton's image attachments into the project.
  3. In Unity, create a new sprite atlas.
  4. Configure the atlas settings to match our camera.
  5. Add all our image attachments from Spine into the atlas.
  6. Create a new Spine SkeletonDataAsset.
  7. Assign the exported skeleton JSON to the SkeletonDataAsset.
  8. Assign the sprite atlas to the SkeletonDataAsset.

It's not difficult, but it is time-consuming and there are several potential points of failure. SpineAutoImport simplifies that workflow to this:

  1. Export the Spine skeleton into the project.
  2. Copy the skeleton's image attachments into the project.
  3. In Unity, right-click the folder containing the exported assets and choose Spine/Import Folder (tk2d).

PLEASE NOTE: SpineAutoImport is built specifically for projects which use both Spine and 2D Toolkit. If you're not using Spine, or if you're using Unity's native 2D support or any other 2D package, then this tool will not work for you. Also, you will need to have already imported the spine-tk2d runtime (available here) and the latest 2D Toolkit package (available here) or else SpineAutoImport will fail to compile.

P.S. If you find a bug or want to make some improvements, pull requests are appreciated! ;)