// Token: 0x06000988 RID: 2440 RVA: 0x00043104 File Offset: 0x00041504 public static Transform GetFirstCommonAncestorRecursive(Transform transform, Transform[] transforms) { if (transform == null) { Debug.LogWarning("Transform is null."); return(null); } if (transforms == null) { Debug.LogWarning("Transforms is null."); return(null); } if (transforms.Length == 0) { Debug.LogWarning("Transforms.Length is 0."); return(null); } if (Hierarchy.IsCommonAncestor(transform, transforms)) { return(transform); } if (transform.parent == null) { return(null); } return(Hierarchy.GetFirstCommonAncestorRecursive(transform.parent, transforms)); }
// Token: 0x06000987 RID: 2439 RVA: 0x00043090 File Offset: 0x00041490 public static Transform GetFirstCommonAncestor(Transform[] transforms) { if (transforms == null) { Debug.LogWarning("Transforms is null."); return(null); } if (transforms.Length == 0) { Debug.LogWarning("Transforms.Length is 0."); return(null); } for (int i = 0; i < transforms.Length; i++) { if (transforms[i] == null) { return(null); } if (Hierarchy.IsCommonAncestor(transforms[i], transforms)) { return(transforms[i]); } } return(Hierarchy.GetFirstCommonAncestorRecursive(transforms[0], transforms)); }