Closed TokageItLab closed 1 month ago
This is great. The serialization issue is unfortunate, but I don't see a cleaner way around.
I'm sorry for the red tape, but could you digitall sign our contributor license agreement? I need this so we can publish your PR under our Spine Runtimes license. Signing it digitally and sending it to contact@esotericsoftware.com is enough!
This also fixes #2477
I've contacted the esotericsoftware by e-mail previously, and got the format and sent the text. Or do I need a separate electronic seal?
Thanks!
The API
load_from_xxx()
must be valid for files outsideres://
in the Godot.load_from_file()
inSpineSkeletonFileResource
GodotSpineTextureLoader
for runtime loading to avoid usingResourceLoader
if it is not in theres://
load_from_atlas_file()
has been fixed to allow loading files outside ofres://
Known issues:
res://
, a load error occurs while the.import
is not created, becauseResourceLoader
is used. If you generate images from Godot and Spine loads them, it is recommended to output them in theuser://
folder.Resource.duplicate()
does not work forSpineSkeletonFileResource
andSpineAtlasResource
because Spine's data resources have incomplete serialization integration with Godot's Resource. This PR allows us to serialize the internal data of those SpineResources to our own Resource, and when we want to load Spine, we can temporarily output those serialized data as a file in theuser://
folder, and load Spine from there to make it work, although it's bit hacky.