loadModelAsync(contentsOf:withName:)
Returns a load request that creates a model entity by asynchronously loading it from a file URL and flattening the model entity’s hierarchy.
Declaration
@MainActor @preconcurrency static func loadModelAsync(contentsOf url: URL, withName resourceName: String? = nil) -> LoadRequest<ModelEntity>Parameters
- url:
The location of a file that represents an entity.
- resourceName:
A unique name the method assigns to the resource it loads, for use in network synchronization.
Discussion
For more information on loading entities, see Loading entities from a file.