public void Play(int channel, string animName, WrapMode wrapMode = WrapMode.Default, float blendTime = 0.0f, InterpolationType easeType = InterpolationType.InOutSine, float weight = 1.0f, bool queued = false) { for (int i = 0; i < _renderer._animationSets.Length; i++) { SpineAnimator childAnimator = _renderer._animationSets[i]._animatior; childAnimator.Play(channel, GetAnimNameForAnimationSet(_renderer._animationSets[i], animName), wrapMode, blendTime, easeType, weight, queued); } }
private void StartAnimation(AnimatorStateInfo stateInfo, int layerIndex, float blendTime) { _animator.Play(layerIndex, _animationName, stateInfo.loop ? WrapMode.Loop : WrapMode.Once, blendTime); _animator.SetAnimationSpeed(layerIndex, _animationName, stateInfo.speed * stateInfo.speedMultiplier); }