private NaturalCompareObjectNames ( Object a, Object b ) : int | ||
a | Object | |
b | Object | |
리턴 | int |
private AnimationClip[] GetOrderedClipList() { AnimationClip[] clips = new AnimationClip[0]; if (state.activeRootGameObject != null) { clips = AnimationUtility.GetAnimationClips(state.activeRootGameObject); } //Using AlphaNum/Natural Compare to sort clips Array.Sort(clips, (AnimationClip clip1, AnimationClip clip2) => EditorUtility.NaturalCompareObjectNames(clip1, clip2)); return(clips); }
public override int Compare(GameObject lhs, GameObject rhs) { if (lhs == rhs) { return(0); } if (lhs == null) { return(-1); } if (rhs == null) { return(1); } return(EditorUtility.NaturalCompareObjectNames(lhs, rhs)); }