HANDS-ON TUTORIAL
Spine 4.1 to Unity 2D Animation Step-by-Step Tutorial: From Export to UnityPackage
This walkthrough explains how to export Spine 4.1 skeletal animations, convert them into native Unity 2D Animation assets using STROLS, and play them smoothly inside Unity 2022.3 LTS or Unity 6 without installing the Spine Runtime.
Step 1: Spine 4.1 Export Configuration
To ensure flawless conversion into Unity 2D assets, verify these export parameters in the Spine editor:
- Spine Version: Ensure your project is authored in Spine 4.1.
- Data Format: Choose either
JSONor binary.skel. Both formats are fully supported. - Export Options: Enable Nonessential data to keep bone metadata intact.
- Texture Packer: Pack your atlas during export, yielding a
.atlas(or.atlas.txt) along with corresponding.pngtexture files.
Step 2: Organizing Your Source Assets
Gather the generated files into a single directory or ZIP archive:
my_character/
├── character.json (or character.skel)
├── character.atlas (or character.atlas.txt)
└── character.png (atlas texture sheet)
You can upload this folder directly or compress it into a standard .zip file.
Step 3: Online Conversion & Browser WebGL Preview
Navigate to STROLS Online Converter:
- Click "Choose folder" or "Choose ZIP" to select your prepared files.
- Click "Start Free Conversion". STROLS performs automated validation and builds native Unity skeletal rigs on the fly.
- Once complete, an interactive WebGL 2D Animation preview launches inside your browser. Inspect playback, switch animations, and check deformations at zero cost.
Step 4: Target Unity Project Setup
Before importing the generated package, verify your Unity project configuration:
- Launch your Unity project (Unity 2022.3 LTS or Unity 6.5 recommended).
- Open Window > Package Manager.
- Select Packages: Unity Registry, locate
2D Animation(com.unity.2d.animation), and click Install.
Step 5: Importing the .unitypackage and Playback
Download the converted package from STROLS and import it into your project:
- Drag the downloaded
.unitypackagefile into your Unity Project window and click Import. - Inspect the extracted assets:
- Character Prefab: Pre-configured with
SpriteRenderer,SpriteSkin, and bone transforms. - Native AnimationClips: Individual animation clips corresponding to each Spine animation timeline (Idle, Walk, Attack, etc.).
- Sprite Library & Sheet: Native sprites sliced and linked to skeletal slots.
- Character Prefab: Pre-configured with
- Drag the prefab into your scene, assign an
Animator Controllerreferencing your new AnimationClips, and press Play!