public Int32 GetIdByBone(Bone seekBone, LoaderSkeletonBone currentSkeletonBone) { Int32 id = -1; if (currentSkeletonBone.GetBoneInfo().Name == seekBone.Name) { id = currentSkeletonBone.GetBoneId(); } if (id < 0) { foreach (var skeletonBone in currentSkeletonBone.GetChildren()) { id = skeletonBone.GetIdByBone(seekBone, skeletonBone); if (id > 0) { return(id); } } } return(id); }