Thanks for the replay!
Below is the code I'm using, which all works in the unity engine.
so here's the code :
it super simple I just run through the list with a int and load the next SkeletonDataAsset.
void Start()
{
clickCount = indexNum; //set current click
infoBox.text = clickCount.ToString(); // show on screen current ID
StartCoroutine(loadPegs(skeletonDataAsset[indexNum])); // first load
}
IEnumerator loadPegs(SkeletonDataAsset SkData)
{
if (skeletonDataAsset == null) yield break;
SkData.GetSkeletonData(false); // Preload SkeletonDataAsset.
yield return new WaitForSeconds(.02f); // Pretend stuff is happening.
var idleAnimation = SkData.GetSkeletonData(false).FindAnimation("idle"); //find idle
var glowAnimation = SkData.GetSkeletonData(false).FindAnimation("glow"); //find glow
var sa = SkeletonAnimation.NewSkeletonAnimationGameObject(SkData); // Spawn a new SkeletonAnimation GameObject.
sa.AnimationState.SetAnimation(0, idleAnimation, true);//set idle
sa.AnimationState.SetAnimation(1, glowAnimation, true);//set glow
sa.transform.SetParent(holdIt.transform, false); // add to card
sa.gameObject.transform.localScale = new Vector3(0.45f, 0.45f, 0);// scale
sa.gameObject.transform.localPosition = new Vector3(.15f, -2f, 0);// Position
}
public void nextElement()
{
// next button
if (clickCount < 117)
{
GameObject removeLastPeg = GameObject.Find("New Spine GameObject");
Destroy(removeLastPeg);
clickCount++;
infoBox.text = clickCount.ToString();
StartCoroutine(loadPegs(skeletonDataAsset[clickCount]));// load next
}
}