public static void Play(this Animator animator, MotionInfo info) { if (info.motion == null) { return; } animator.speed = info.speed; if (info.crossFade) { animator.CrossFade(info.motion.name, info.crossFadeSpeed); } else { animator.Play(info.motion.name); } }
public static void Play(this Animator animator, MotionInfo info) { animator.speed = info.speed; animator.Play(info.motion.name); }