<!--
{
  "availability" : [
    "iOS: 13.0.0 - 18.0.0",
    "iPadOS: 13.0.0 - 18.0.0",
    "macCatalyst: 13.0.0 - 18.0.0",
    "macOS: 10.15.0 - 15.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/Entity/loadModelAsync(contentsOf:withName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation6EntityC14loadModelAsync10contentsOf8withNameAA11LoadRequestCyAA0eC0CG0B03URLV_SSSgtFZ"
  },
  "title" : "loadModelAsync(contentsOf:withName:)"
}
-->

# 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.

```
@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](/documentation/RealityKit/loading-entities-from-a-file).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)