Contents

childObjects(of:)

Returns all objects contained in the asset of the specified class.

Declaration

func childObjects(of objectClass: AnyClass) -> [MDLObject]

Parameters

  • objectClass:

    A Model I/O class (that is, a subclass of Mdlobject) representing a type of object stored in the asset. For example, pass the Mdlmesh class to find all 3D objects stored in the asset, or the Mdllight class to find all light sources.

Return Value

An array of objects of the specified type, or an empty array if no such objects exist.

Discussion

This method searches the asset’s entire child object hierarchy to find all objects of the specified type contained in the asset.

See Also

Working with Asset Content