The task at hand is to be able to load Spine animations from external directories outside of the program's folder in Godot during runtime. The issue is that the "load" and "preload" methods are not suitable for this purpose.
The first problem is that when loading an atlas, it is only possible to load from the resource folder and the root of the logical drive. Loading from an external folder or the "user://" folder does not work:
This works:
var atlas = SpineAtlasResource.new()
atlas.load_from_atlas_file("res://Assets/Spine/Boy.atlas")
This does not work:
var atlas = SpineAtlasResource.new()
atlas.load_from_atlas_file("user://Boy.atlas")
The error message shown is:
ResourceLoader::_load: Resource file not found: res://:/Boy.png.
GodotSpineTextureLoader::load: Can't load texture: "user://Boy.png"
This works:
var atlas = SpineAtlasResource.new()
atlas.load_from_atlas_file("C://Boy.atlas")
However, this does not work:
var atlas = SpineAtlasResource.new()
atlas.load_from_atlas_file("C://Users/user/Desktop/Boy.atlas")
It returns the same error stating that the file cannot be found or loaded.
The second issue is the lack of an available API interface for loading "*.spine-json" files:
var json = SpineSkeletonFileResource.new()
json.load_from_file ???
How to load it remains unclear.
Please assist in finding a solution.
Godot 3.5.3, Spine 4.2, Spine SRC file: ver.4.2