Пример #1
0
        public static AnimatorDescription GetAnimatorController(string assetPath)
        {
            var animatorControllerPath = GetAnimatorControllerPath(assetPath);
            var animatorController     = AnimatorDescription.LoadAnimatorDescription(animatorControllerPath);

            if (animatorController == null)
            {
                animatorController = AnimatorDescription.CreateAnimatorDescription(animatorControllerPath);
            }
            return(animatorController);
        }
Пример #2
0
 public static void ReplaceAnimator(AnimatorDescription animator,
                                    List <AnimatorGeneratorDialogWindow.AnimationView> animations)
 {
     for (var index = 0; index < animations.Count; index++)
     {
         if (!animations[index].Checked)
         {
             continue;
         }
         animator.ReplaceAnimation(animations[index].Animation, animations[index].Default);
     }
     animator.SetDirty();
 }