---
title: children
framework: modelio
role: symbol
role_heading: Instance Property
path: modelio/mdlobject/children
---

# children

A component that manages this object’s collection of children.

## Declaration

```swift
var children: any MDLObjectContainerComponent { get set }
```

## Discussion

Discussion Many asset formats describe a hierarchy of transforms that model the spatial relationships between meshes, lights, and cameras in the asset. In such formats, hierarchic transforms are MDLObject instances whose children property references the objects affected by the transform, and those objects can be other MDLObject instances with children of their own. This property’s value is a component object—either a MDLObjectContainer instance, or a custom class that adopts the MDLObjectContainerComponent protocol. By default, an object has no container component (that is, this property’s value is nil). To add a container component, either write to this property an instance of a container component class or call the addChild(_:) method to create a default MDLObjectContainer instance and add a child object to that container. note: Reading or writing this property is equivalent to calling the componentConforming(to:) or setComponent(_:for:) method with the MDLObjectContainerComponent protocol. Container components support fast enumeration and subscripting, so you can treat an object’s children property similarly to an array.

## See Also

### Working with Object Hierarchies

- [parent](modelio/mdlobject/parent.md)
- [addChild(_:)](modelio/mdlobject/addchild(_:).md)
- [enumerateChildObjects(of:root:using:stopPointer:)](modelio/mdlobject/enumeratechildobjects(of:root:using:stoppointer:).md)
- [path](modelio/mdlobject/path.md)
- [atPath(_:)](modelio/mdlobject/atpath(_:).md)
