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


protocol MDLObjectContainerComponent


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.


Working with Child Objects

var objects: [MDLObject]

This object’s array of child objects.


func add(MDLObject)

Adds the specified object as a child of this object.


func remove(MDLObject)

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


Instance Properties

Instance Methods


Conforming Types

See Also

Extensible Asset Format Support

protocol MDLComponent

The base protocol for extensible file format support in Model I/O.

class MDLObjectContainer

A default implementation for handling object hierarchy relationships in a 3D asset.

protocol MDLTransformComponent

The general interface for classes that manage local coordinate space transforms for 3D objects