private GetAnimationClipsFlattened ( ) : UnityEngine.AnimationClip[] | ||
Результат | UnityEngine.AnimationClip[] |
private static AnimationClip GetFirstAnimationClipFromMotion(Motion motion) { AnimationClip animationClip = motion as AnimationClip; AnimationClip result; if (animationClip) { result = animationClip; } else { UnityEditor.Animations.BlendTree blendTree = motion as UnityEditor.Animations.BlendTree; if (blendTree) { AnimationClip[] animationClipsFlattened = blendTree.GetAnimationClipsFlattened(); if (animationClipsFlattened.Length > 0) { result = animationClipsFlattened[0]; return(result); } } result = null; } return(result); }
private static AnimationClip GetFirstAnimationClipFromMotion(Motion motion) { AnimationClip clip = motion as AnimationClip; if (clip != null) { return(clip); } UnityEditor.Animations.BlendTree tree = motion as UnityEditor.Animations.BlendTree; if (tree != null) { AnimationClip[] animationClipsFlattened = tree.GetAnimationClipsFlattened(); if (animationClipsFlattened.Length > 0) { return(animationClipsFlattened[0]); } } return(null); }
static AnimationClip GetFirstAnimationClipFromMotion(Motion motion) { AnimationClip clip = motion as AnimationClip; if (clip) { return(clip); } Animations.BlendTree blendTree = motion as Animations.BlendTree; if (blendTree) { AnimationClip[] clips = blendTree.GetAnimationClipsFlattened(); if (clips.Length > 0) { return(clips[0]); } } return(null); }