Instance Method


Executes the specified block using each object in this object's child hierarchy.


func enumerateChildObjects(of objectClass: AnyClass, root: MDLObject, using block: @escaping (MDLObject, UnsafeMutablePointer<ObjCBool>) -> Void, stopPointer: UnsafeMutablePointer<ObjCBool>)



A Model I/O class representing a type of child objects to evaluate. For example, pass the MDLMesh class to evaluate all 3D objects stored in the asset. Pass the MDLObject class to evaluate all child objects regardless of type.


The root object at which to begin traversing the child object hierarchy.


The block to apply to child objects. This block takes two parameters: the object to be evaluated by the block, and a stop pointer that you can set to true to stop further evaluation of the object hierarchy.


Set this pointer's value to true during enumeration to stop further enumeration of the object hierarchy.

See Also

Working with Object Hierarchies

var parent: MDLObject?

The parent object that contains this object.

var children: MDLObjectContainerComponent

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

func addChild(MDLObject)

Adds a child object to this object, creating a container for the object’s children if necessary.

var path: String

A path that identifies the object in an asset's object hierarchy using object names.

func atPath(String) -> MDLObject

Returns the child object at the specified path.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software