- Изменено
I added on my projectile spine game object as a child, added link to this object in my script. I'm trying to get component and set animation but unity returns an error.
[SerializeField]
private GameObject _spineAnimator;
[SpineAnimation]
public string _onDeadAnimation;
public override void OnDamageDeal()
{
Spine.AnimationState skeletonAnimationState = _spineAnimator.GetComponent<SkeletonAnimation>().AnimationState;
skeletonAnimationState.SetAnimation(0, _onDeadAnimation, true);
//Destroy(gameObject);
}
https://disk.yandex.ru/i/N77dH_Le996cRA
https://disk.yandex.ru/i/F75d61TyyVCEow
The object has this animation but unity can't find it. What the reason?
Can Sceleton Utility be the obstacle for it?