Ejemplo n.º 1
0
        public static Component GetClosestAnimationPlayerComponentInParents(Transform tr)
        {
            Animator closestAnimatorInParents = AnimationWindowUtility.GetClosestAnimatorInParents(tr);

            if (closestAnimatorInParents != null)
            {
                return(closestAnimatorInParents);
            }
            Animation closestAnimationInParents = AnimationWindowUtility.GetClosestAnimationInParents(tr);

            if (closestAnimationInParents != null)
            {
                return(closestAnimationInParents);
            }
            return(null);
        }
        public static Component GetClosestAnimationPlayerComponentInParents(Transform tr)
        {
            Animator animatorInParents = AnimationWindowUtility.GetClosestAnimatorInParents(tr);

            if ((UnityEngine.Object)animatorInParents != (UnityEngine.Object)null)
            {
                return((Component)animatorInParents);
            }
            Animation animationInParents = AnimationWindowUtility.GetClosestAnimationInParents(tr);

            if ((UnityEngine.Object)animationInParents != (UnityEngine.Object)null)
            {
                return((Component)animationInParents);
            }
            return((Component)null);
        }
        public static Component GetClosestAnimationPlayerComponentInParents(Transform tr)
        {
            Animator  closestAnimatorInParents = AnimationWindowUtility.GetClosestAnimatorInParents(tr);
            Component result;

            if (closestAnimatorInParents != null)
            {
                result = closestAnimatorInParents;
            }
            else
            {
                Animation closestAnimationInParents = AnimationWindowUtility.GetClosestAnimationInParents(tr);
                if (closestAnimationInParents != null)
                {
                    result = closestAnimationInParents;
                }
                else
                {
                    result = null;
                }
            }
            return(result);
        }