Contents

canImportFileExtension(_:)

Returns a Boolean value that indicates whether the Mdlasset class can read asset data from files with the specified extension.

Declaration

class func canImportFileExtension(_ extension: String) -> Bool

Parameters

  • extension:

    The filename extension identifying an asset file format.

Return Value

true if the MDLAsset class can read asset data from files with the specified extension; otherwise, false.

Discussion

If this method returns true, you can use the init(url:) or init(url:vertexDescriptor:bufferAllocator:) initializer to import an asset with the specified filename extension.

The set of supported extensions and formats includes:

.abc

Alembic

.usd, .usda, .usdc

Universal Scene Description

.usdz

Universal Scene Description (Mobile)

.ply

Polygon

.obj

Wavefront Object

.stl

Standard Tessellation Language

Additional formats may be supported as well.

See Also

Creating an Asset