<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/MultipeerConnectivityService/entity(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:10RealityKit28MultipeerConnectivityServiceC6entity3for0A10Foundation6EntityCSgs6UInt64V_tF"
  },
  "title" : "entity(for:)"
}
-->

# entity(for:)

Gets the entity with the given identifier.

```
@MainActor @preconcurrency func entity(for identifier: MultipeerConnectivityService.Identifier) -> Entity?
```

## Parameters

`identifier`

The identifier.

## Return Value

The entity with the corresponding identifier.

---

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)