---
title: "loadAnchorAsync(contentsOf:withName:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/entity/loadanchorasync(contentsof:withname:)"
---

# loadAnchorAsync(contentsOf:withName:)

Asynchronously loads an anchor entity from a file URL.

## Declaration

```swift
@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

Return Value A resource loader that publishes the root entity in the loaded file as an AnchorEntity.

## See Also

### Loading an anchor entity

- [loadAnchor(named:in:)](realitykit/entity/loadanchor(named:in:).md)
- [loadAnchor(contentsOf:withName:)](realitykit/entity/loadanchor(contentsof:withname:).md)
- [loadAnchorAsync(named:in:)](realitykit/entity/loadanchorasync(named:in:).md)
