Ok, from the names of the functions you are using, I can deduce you are using either the Unity or Tk2d runtime (most probably Unity, C# for certain).
Your code's the way to load a skeleton from the cached skeletonData. Your task now is to preload the skeletonData when the rest of your game assets are loading.
As far as Unity is concerned, I'm just looking at docs and sources and online articles to figure out how to do this. My suggestion would be to ask Mitch directly to create a video explaining how to load SkeletonData during LoadLevel(ASync) call. viewtopic.php?f=3&t=3318
However, this is some of the info I've found out so far:
When you add your assets to the 'Asset' folder in Unity, and add the asset to the level, Unity will import these assets during runtime. By default it imports things like textures and text files, but Nate has added functionality to the Unity Spine Editor controls to import all assets needed by an animation and has created asset types from ScriptableObject { AtlasAsset, SkeletonDataAsset}
These asset types have properties on them that describe the sub assets. For instance AtlasAsset has both a TextAsset (Unity core type) and Materials List. These properties are set in the editor (automatically by the Spine Unity Editor Code).
I'm going out on a limb and saying that when loading a level, Unity does:
ScriptableObject.CreateInstance()
ScriptableObject.properties = values_set_by_editor
ScriptableObject.OnEnable()
Hopefully, Unity respects the asset dependency hierarchy. For Instance, AtlasAsset has both a TextAsset (descriptor file) and a Materials[] array. Ideally, both the TextAsset and Materials would have been loaded and enabled() before being set as properties on the AtlasAsset.
SkeletonDataAsset has an AtlasAsset and a TextAsset (JSON). When you call GetSkeletonData() it processes and loads the JSON file for the first time, and then returns the cached version on each subsequent call.
So my suggestion is to add these lines to SkeletonDataAsset:
void OnEnable() {
GetSkeletonData();
}
Cross your fingers and hope that all the dependencies are loaded before OnEnable is called.
And because I'm not a Unity programmer, this is just a guess.