public static bool IsChildOf(UnityGameObject a, UnityGameObject b) { if (a == null || b == null || a.Value == null || b.Value == null || a.Value == b.Value) { return(false); } return(a.Value.transform.IsChildOf(b.Value.transform)); }
public static bool IsChildOfAny(UnityGameObject a, UnityGameObject[] targets) { return(targets != null && targets.Length > 0 && targets.Any(b => IsChildOf(a, b))); }