/// <summary> /// Changes the animation. /// </summary> /// <param name="animationName">Name of the animation.</param> /// <param name="mode">The interpolation mode.</param> public void ChangeAnimation(string animationName, AnimationChangeMode mode) { if (changeOnlyWhenDifferentAnimation) { if (animationName != actualAnimation) { animationController.CrossFade( skinnedModel.AnimationClips[animationName], TimeSpan.FromSeconds(transitionBetweenAnimationTimeInSeconds)); actualAnimation = animationName; } } else { animationController.CrossFade( skinnedModel.AnimationClips[animationName], TimeSpan.FromSeconds(transitionBetweenAnimationTimeInSeconds)); actualAnimation = animationName; } }