Thanks for the redirection!
I'm kind of not getting the most current workflow to utilize mecanim atm which gets me undesired results when
using UnityEngine;
using System.Collections;
using Spine.Unity;
public class SpineAnimationBehaviour : StateMachineBehaviour
{
public string animClip;
public int layer = 0;
public float timeScale = 1f;
private float normalizedTime;
public float exitTime = .85f;
public bool loop;
private SkeletonAnimation skeletonAnimation;
private Spine.AnimationState spineAnimationState;
private Spine.TrackEntry trackEntry;
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
if (skeletonAnimation == null)
{
skeletonAnimation = animator.GetComponentInChildren<SkeletonAnimation>();
spineAnimationState = skeletonAnimation.state;
}
trackEntry = spineAnimationState.SetAnimation(layer, animClip, loop);
trackEntry.TimeScale = timeScale;
normalizedTime = 0f;
}
override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
normalizedTime = trackEntry.trackTime / trackEntry.trackEnd;
if(!loop && normalizedTime >= exitTime)
{
animator.SetTrigger("transition");
}
}
override public void OnStateExit (Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
}
}
is what is attached to every single clip(as solitary states) in mecanim, therefore I can't really workout the blend tree.
What I want to achieve is just like any other mecanim workflow I'd get to play clips drag & drop without needing such script as above. Is there current workflow?