Пример #1
0
 public static bool AddClipToAnimationPlayerComponent(Component animationPlayer, AnimationClip newClip)
 {
     if (animationPlayer is Animator)
     {
         return(AnimationWindowUtility.AddClipToAnimatorComponent(animationPlayer as Animator, newClip));
     }
     return(animationPlayer is Animation && AnimationWindowUtility.AddClipToAnimationComponent(animationPlayer as Animation, newClip));
 }
        public static bool AddClipToAnimationPlayerComponent(Component animationPlayer, AnimationClip newClip)
        {
            bool result;

            if (animationPlayer is Animator)
            {
                result = AnimationWindowUtility.AddClipToAnimatorComponent(animationPlayer as Animator, newClip);
            }
            else
            {
                result = (animationPlayer is Animation && AnimationWindowUtility.AddClipToAnimationComponent(animationPlayer as Animation, newClip));
            }
            return(result);
        }