예제 #1
0
        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));
        }
예제 #2
0
 public static bool IsChildOfAny(UnityGameObject a, UnityGameObject[] targets)
 {
     return(targets != null && targets.Length > 0 && targets.Any(b => IsChildOf(a, b)));
 }