Type Method

loadModel(contentsOf:withName:)

Blocks your app while loading a model entity from a file URL.

Declaration

static func loadModel(contentsOf url: URL, withName resourceName: String? = nil) throws -> ModelEntity

Parameters

url

A file URL representing the file to load.

resourceName

A unique name to assign to the loaded resource, for use in network synchronization.

Return Value

The root entity in the loaded file, cast as a ModelEntity.

See Also

Loading a Flattened Model Entity

static func loadModel(named: String, in: Bundle?) -> ModelEntity

Blocks your app while loading a model entity from a file in a bundle.

static func loadModelAsync(named: String, in: Bundle?) -> LoadRequest<ModelEntity>

Loads a model entity from a file in a bundle asynchronously.