NightKot Hello. Help with advice. I created a character with two Skins, each with two animations. Idle and Walk. In the first the character has an active Idle, in the second Walk. How to switch skins and animations from the code correctly?
Harald Please check out the documentation pages here, they explain everything you might need: spine-unity Runtime Documentation: spine unity Runtime Documentation
NightKot Thank. I will read it. Thank. The problem has been resolved. using Spine.Unity; using System.Collections; using System.Collections.Generic; using UnityEngine; public class AnimState : StateMachineBehaviour { public string animationName; public string skinName; public float speed; override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int LayerIndex) { SkeletonAnimation anim = animator.GetComponent<SkeletonAnimation>(); anim.initialSkinName = skinName; anim.Initialize(true); anim.state.SetAnimation(0, animationName, true).TimeScale = speed; } }