• RuntimesUnreal
  • Loading spine files from disk at runtime?

In Unreal, how can I load the skeleton json, atlas txt, and spritesheet png properly from an outside folder at runtime?

Related Discussions
...

Is all of this exposed to blueprints? I'm trying to do it through blueprints as well, however I'm having issues with the SkeletonDataAsset class, as SetSkeletonData doesn't seem to be a part of it, and I can't create a new object of it either.

Edit ^
I checked the source and there seems to be no way to SetSkeletonData, SetAtlasData, or AddTexture to any of the asset files.

un mes más tarde

Spinebot was replying with hallucinations.

I honestly do not know how to do that as Unreal is still a big mystery to me when it comes to asset managment. I've opened an issue here:
EsotericSoftware/spine-runtimes2621

It will take a while for me to research this. From a quick glance, it seems that even popping up a file selection dialog for your artist to let them pick a file requires a 3rd party plugin.
https://forums.unrealengine.com/t/loading-and-using-new-assets-at-runtime/685480/2

And loading anything through the sanctioned way requires you to create PAK files it seems?
https://dev.epicgames.com/community/learning/knowledge-base/D7nL/unreal-engine-primer-loading-content-and-pak-files-at-runtime?locale=es-mx

As I said, a mystery.

    Mario Oh no, not a file selection, that would be way too much to ask for lol. Just a simple load json/txt from a folder at runtime apply it to the skeleton (Similar to how mods work in many games).

    Unreal can load a json at runtime:
    FString loadedJson;
    FFileHelper::LoadFileToString(loadedJson, *("Project/Mods/TestSkeleton.json"));

    Would this loaded json string be possible to load into the skeleton? Dragging the json into the editor already parses everything into the uasset, so I wonder if it might be a simple process?

    The Unity Spine already works this way, does this seem simple in unreal? Or is it still much more complex than that? (If so then no worries!)