Type Method

loadModel(named:in:)

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

Declaration

static func loadModel(named name: String, in bundle: Bundle? = nil) throws -> ModelEntity

Parameters

name

The base name of the file to load, omitting the file extension.

bundle

The bundle containing the file. Use nil to search the app’s main bundle.

Return Value

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

See Also

Loading a Flattened Model Entity

static func loadModel(contentsOf: URL, withName: String?) -> ModelEntity

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

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

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