Вот нашел то, что мне нужно.
http://ru.esotericsoftware.com/forum/PS ... 704#p60704 Но официальный скрипт от Esotericsoftware не работает. Создаю AnimationReferenceAsset, в редакторе скрипт сам ассет видит, и естественно я его туда вставляю. ошибка появляется только при запуске NullReferenceException: Object reference not set to an instance of an object
SampleAnimationReferenceScript.Start ()
сам скрипт
using UnityEngine;
using Spine.Unity;
public class SampleAnimationReferenceScript : MonoBehaviour
{
public AnimationReferenceAsset run;
void Start()
{
var skeletonAnimation = GetComponent<SkeletonAnimation>();
skeletonAnimation.AnimationState.SetAnimation(0, run, true); ВОТ в ЭТОЙ строке ошибка
//optionally: //skeletonAnimation.AnimationState.SetAnimation(0, run.Animation, true);
Debug.Log("This animation is " + run.Animation.Duration + " seconds long.");
}
}