# Spine animation for Godot

> Use an Animate4Me Spine 4.2 export in Godot with the official spine-godot runtime:.spine-json, SpineSkeletonDataResource, SpineSprite and GDScript code.

Page: https://animate4me.com/spine-animation-for-godot.html

This guide shows how to play a Spine 4.2 animation made with Animate4Me in Godot with the official **spine-godot** runtime, and how to switch animations from GDScript.

Godot works well with our exports: spine-godot does not support premultiplied-alpha atlases, and our atlas pages are straight alpha, so nothing needs converting. To try it before you buy, use our [example export](https://animate4me.com/download/animate4me_ring_v2_spine42.zip) (0.5 MB).

[Try it](https://animate4me.com/app.html) [See pricing](https://animate4me.com/pricing.html)

## How do I use an Animate4Me animation in Godot?

Animate4Me gives you a Spine 4.2 export that the official spine-godot runtime imports after one rename.

**Best for:** Godot developers who want animated icons, items, props or characters as Spine skeletons, not flipbooks.

**Key advantages:**

- Straight-alpha atlas pages, which is what spine-godot needs.
- Named animations such as `idle` and `win` for `set_animation`.
- Bones and weighted meshes: smooth motion at any frame rate.
- Live preview in the browser before you download.

**What you get:** one ZIP with skeleton.json, skeleton.atlas, a PNG page and a README; 20 tokens per symbol or object from your image.

## Before you start

- **Install spine-godot for Spine 4.2.** Esoteric Software offers a GDExtension (copy its `bin/` folder into your project root) and prebuilt Godot editors with the engine module, which also support C#. Pick the build for your Godot version and for runtime 4.2.
- **Match the version.** The export is Spine 4.2 data, so the runtime must be 4.2 too.
- **Spine licence.** Using a Spine Runtime in your product needs your own Spine licence from Esoteric Software.

## Step 1: get the export

Make the animation in the [app](https://animate4me.com/app.html), pick the templates, check the preview and download the ZIP:

- `skeleton.json`: Spine 4.2 skeleton data with bones, weighted meshes and one named animation per template you chose (for example `idle` and `win`).
- `skeleton.atlas`: the texture atlas description. Its header says `pma: false`: the pages are straight alpha, not premultiplied.
- `skeleton.png`: the atlas page. A symbol or object export is one page, usually about 450 to 1,500 px on each side, in a ZIP of about 0.1 to 1.8 MB.
- `README.txt`: the animation list and loading notes.

## Step 2: rename the skeleton file

Godot treats `.json` files as its own JSON resources, so spine-godot expects Spine JSON with the extension `.spine-json`. Rename `skeleton.json` to `skeleton.spine-json`. Keep `skeleton.atlas` and `skeleton.png` as they are, and give every export its own folder, for example `res://spine/ring/`.

## Step 3: import and create the skeleton data

1. Drag the folder into the Godot FileSystem panel. spine-godot imports the `.spine-json` as a skeleton file resource, the `.atlas` as an atlas resource and the PNG as a texture.
2. Right-click the folder, choose **New Resource…**, pick **SpineSkeletonDataResource** and save it.
3. Open the new resource and assign the atlas resource and the skeleton file resource.
4. Add a **SpineSprite** node to your scene and assign the skeleton data resource to it. The skeleton shows up in the editor, and you can preview animations in the inspector.

The export is sized in pixels; use the node's scale to fit it into your scene.

## Step 4: play idle and win from GDScript

Attach this script to the `SpineSprite`. It loops `idle`; `play_win()` plays `win` once and queues `idle` after it.

```
extends SpineSprite

func _ready():
    # animation name, loop, track
    get_animation_state().set_animation("idle", true, 0)

func play_win():
    var state = get_animation_state()
    state.set_animation("win", false, 0)
    # name, delay, loop, track: delay 0 = right after win ends
    state.add_animation("idle", 0, true, 0)
```

The same API exists in C# with the spine-godot C# build. The animation names in your file are the templates you chose; the README in the ZIP lists them.

## Troubleshooting

- **The skeleton file is not recognised:** it still ends in `.json`. Rename it to `.spine-json`.
- **Parse or version errors:** the spine-godot build is not 4.2.
- **Nothing shows in SpineSprite:** the skeleton data resource is missing the atlas or the skeleton file.

## How much does it cost?

A symbol or object animation from your image costs **20 tokens**, from a text prompt **30 tokens**; a character costs **60 tokens** from an image. Tokens come with a monthly plan: **Indie** $19 a month for 300 tokens, **Studio** $59 a month for 1200 tokens, **Pro** $199 a month for 5000 tokens. There is no free trial and there are no free tokens. Your first plan payment comes with a 7-day money-back, see the [Refund Policy](https://animate4me.com/refund.html); if an animation fails on our side, its tokens are returned automatically.

## Questions and answers

### Does spine-godot need premultiplied alpha?

No. spine-godot does not support premultiplied-alpha atlases. Animate4Me atlas pages are straight alpha, so they work as they are.

### Why does Godot not import my skeleton.json?

spine-godot expects Spine JSON files with the.spine-json extension. Rename skeleton.json to skeleton.spine-json.

### Which spine-godot version do I need?

A spine-godot build for runtime 4.2 that matches your Godot version, either the GDExtension or a prebuilt editor with the engine module.

### Can I use C# instead of GDScript?

Yes, with the spine-godot build that supports C#. The animation calls map one to one.

### Do I need a Spine licence?

The exported files are yours. To play them in your own product with an official Spine Runtime you need your own Spine licence from Esoteric Software, the same as for any Spine export.

## Related

- [Spine animation for Unity](https://animate4me.com/spine-animation-for-unity.html)
- [Spine export for game engines](https://animate4me.com/spine-export-for-game-engines.html)
- [Auto-rig a PNG for Spine](https://animate4me.com/auto-rig-png-for-spine.html)
- [Prompt to Spine animation](https://animate4me.com/prompt-to-spine.html)
- [Animate4Me home](https://animate4me.com/)

## Make a Spine animation for your Godot game.

[Try it](https://animate4me.com/app.html)

[Plans and token prices](https://animate4me.com/pricing.html)

---

Animate4Me: https://animate4me.com/ · Contact: contact@animate4me.com · X: https://x.com/Animate4Me · All pages for AI assistants: https://animate4me.com/llms.txt

Spine is a trademark of Esoteric Software. Animate4Me is not affiliated.
