• RuntimesGodotBugs
  • Cannot Add Atlas to SpineAtlasResource

Problem statement

For newly created spine_atlas_resource.etres files, my source path is unresponsive. If I try to type into it, then it immediately clears itself and prints "Set source_path". There is no file selection drop-down, either.

I'm not sure if this expected behavior or not. Interestingly, when loading in the example spine projects (into my same Godot engine, forked from 4.2), then I am able to run them without issue. HOWEVER - they are read-only, and when I click on re-import, the engine crashes.

Describe: 1) what you have tried, 2) what you expected, and 3) what actually happened.

To work around this, I tried performing everything programmatically, but couldn't get it to work. Is this possible? If someone has an example of a working programmatic GDScript approach, I'd love to try it. Unfortunately I don't have the attempts anymore, since my last engine restart cleared my "undo".

Another thing I attempted - I took a look at the atlas resource from the example projects, and tried to code my own approach, following the same structure -
`
[gd_resource type="SpineSkeletonDataResource" load_steps=5 format=3 uid="uid://unique-id-1"]

[ext_resource type="SpineAtlasResource" uid="uid://unique-id-2" path="res://player/animation/dwarf-03.atlas" id="1"]
[ext_resource type="SpineSkeletonFileResource" uid="uid://unique-id-3" path="res://player/animation/dwarf-main.spine-json" id="2"]

[sub_resource type="SpineAnimationMix" id="1"]
from = "production set/production 01/idle-01"
to = "production set/production 01/run-01"
mix = 0.2

[sub_resource type="SpineAnimationMix" id="2"]
from = "production set/production 01/run-01"
to = "production set/production 01/jump-01"
mix = 0.3

[resource]
atlas_res = ExtResource("1")
skeleton_file_res = ExtResource("2")
default_mix = 0.1
animation_mixes = [SubResource("1"), SubResource("2")]
`

I then created a new skeleton file resource, and then wired both the coded atlas and the new file resource into a SpineSkeletonDataResource. I then dragged that resource onto the SpineSprite node. It throws no errors until I try to run the project, at which point I receive -

Give step-by-step instructions so we can reproduce the problem, if possible.

  1. Start engine
  2. Add a new spine atlas resource
  3. Observe that none of it's fields are editable

If this is a known solved issue, then perhaps I'll have to get dirty and dig into the C++, perhaps updating the module with the latest from GitHub, but I'm just trying to make sure that there isn't something I'm mis-understanding. I'm completely new to SPINE, and all I have at my disposal/experience in at this moment are the files my SPINE contractor has handed me, as well as the GODOT SPINE Runtime in my 4.2 engine fork.

Runtime information

Tell us your Spine Runtimes version.
Not certain since a contractor implemented the module into the engine for me, but I'm seeing -

  • Last updated July 28, 2023. Replaces all prior versions.
Post your entire error messages here (or attach them), if you got any error messages.
Related Discussions
...

It seems like you're encountering issues with setting the source_path for SpineAtlasResource in Godot using the spine-godot runtime. This behavior is not expected, as you should be able to set the source_path for your atlas resource. Here are a few steps and considerations that might help resolve the issue:

  1. Check File Paths: Ensure that the paths you are using for your .atlas and .spine-json files are correct and accessible from your Godot project. The paths should be relative to your project directory.

  2. Godot Version Compatibility: Since you mentioned using a forked version of Godot 4.2, ensure that the spine-godot runtime you are using is compatible with this version. The runtime might have specific requirements or limitations with certain Godot versions.

  3. Re-importing Assets: If the Godot editor crashes upon re-importing, it might be due to a version mismatch or corrupted files. Try re-exporting your Spine assets from the Spine Editor and re-importing them into Godot.

  4. Programmatic Approach: If you want to set up the resources programmatically, ensure that you are correctly creating and assigning the resources in GDScript. Here's a basic example of how you might set up a SpineAtlasResource and SpineSkeletonDataResource in GDScript:

       var atlas_resource = SpineAtlasResource.new()
       atlas_resource.set_source_path("res://path/to/your.atlas")
    
       var skeleton_file_resource = SpineSkeletonFileResource.new()
       skeleton_file_resource.set_source_path("res://path/to/your.skel")
    
       var skeleton_data_resource = SpineSkeletonDataResource.new()
       skeleton_data_resource.atlas_res = atlas_resource
       skeleton_data_resource.skeleton_file_res = skeleton_file_resource
  5. Check for Errors: Review any error messages or logs provided by Godot when you attempt to run the project. These can provide clues about what might be going wrong.

  6. Update the Runtime: If the issue persists, consider updating the spine-godot runtime to the latest version. This might involve recompiling the Godot editor with the updated runtime module.

If these steps do not resolve the issue, it might be necessary to delve into the C++ code of the spine-godot module to identify any potential bugs or compatibility issues with your specific setup.


I am using 4.3 Godot with 4.2 Spine and your menu don't look like mine.

For loading raw .atlas/.json/.skel files from disk, check out this example:
EsotericSoftware/spine-runtimesblob/4.2/spine-godot/example-v4/examples/13-load-from-disk/load_from_disk.gd

As for the source path, I'm not sure why you'd want to set this manually in the editor? The atlas resources are generated automatically by spine-godot if you add a .atlas file to your Godot project.