UnityEditor.GameObjectUtility.HasChildren C# (CSharp) Method

HasChildren() static private method

static private HasChildren ( IEnumerable gameObjects ) : bool
gameObjects IEnumerable
return bool
        internal static bool HasChildren(IEnumerable<GameObject> gameObjects)
        {
            if (<>f__am$cache0 == null)
            {
                <>f__am$cache0 = go => go.transform.childCount > 0;

Usage Example

 internal static GameObjectUtility.ShouldIncludeChildren DisplayUpdateChildrenDialogIfNeeded(IEnumerable <GameObject> gameObjects, string title, string message)
 {
     if (!GameObjectUtility.HasChildren(gameObjects))
     {
         return(GameObjectUtility.ShouldIncludeChildren.HasNoChildren);
     }
     return((GameObjectUtility.ShouldIncludeChildren)EditorUtility.DisplayDialogComplex(title, message, "Yes, change children", "No, this object only", "Cancel"));
 }