<!--
{
  "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/loadAnchorAsync(contentsOf:withName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation6EntityC15loadAnchorAsync10contentsOf8withNameAA11LoadRequestCyAA0eC0CG0B03URLV_SSSgtFZ"
  },
  "title" : "loadAnchorAsync(contentsOf:withName:)"
}
-->

# loadAnchorAsync(contentsOf:withName:)

Asynchronously loads an anchor entity from a file URL.

```
@MainActor @preconcurrency static func loadAnchorAsync(contentsOf url: URL, withName resourceName: String? = nil) -> LoadRequest<AnchorEntity>
```

## Parameters

`url`

A file URL representing the file to load.

`resourceName`

A unique name the method assigns to the resource it loads,
for use in network synchronization.

## Return Value

A resource loader that publishes the root entity in the
loaded file as an [`AnchorEntity`](/documentation/RealityKit/AnchorEntity).

---

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)