<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLObjectContainerComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(pl)MDLObjectContainerComponent"
  },
  "title" : "MDLObjectContainerComponent"
}
-->

# MDLObjectContainerComponent

The general interface for classes that can act as containers in an object hierarchy.

```
protocol MDLObjectContainerComponent : NSFastEnumeration, MDLComponent
```

## Overview

Model I/O uses this interface to represent content loaded from an asset file. Various asset file formats define collections of information to describe their contents, such as a hierarchy of transforms to model the spatial relationships between models, lights, and meshes contained in an asset. When Model I/O imports such asset formats, the contents of the asset are objects implementing this protocol. You can also adopt this protocol in your own classes to describe your own custom asset formats—for example, one that includes collections of scripts and their triggers associated with the objects in a scene.

## Topics

### Working with Child Objects

[`objects`](/documentation/ModelIO/MDLObjectContainerComponent/objects)

This object’s array of child objects.

[`-  addObject:`](/documentation/ModelIO/MDLObjectContainerComponent/add(_:))

Adds the specified object as a child of this object.

[`-  removeObject:`](/documentation/ModelIO/MDLObjectContainerComponent/remove(_:))

Removes the specified object from this object’s array of children.

## Relationships

### Inherits From

[`NSFastEnumeration`](/documentation/Foundation/NSFastEnumeration)

[`MDLComponent`](/documentation/ModelIO/MDLComponent)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Conforming Types

[`MDLObjectContainer`](/documentation/ModelIO/MDLObjectContainer)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)