---
title: "findEntity(id:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/scene/findentity(id:)"
---

# findEntity(id:)

Returns Entity with the given Entity.ID in the Scene.

## Declaration

```swift
@MainActor @preconcurrency func findEntity(id: Entity.ID) -> Entity?
```

## Parameters

- `id`: Entity.ID obtained from Entity.id

## Return Value

Return Value Entity with the given Entity.ID, or nil if no such Entity is found in the Scene.

## Discussion

Discussion note: This method uses efficient mapping from Entity.ID to Entity, not linear traversal of all Entities in the Scene.

## See Also

### Finding entities

- [findEntity(named:)](realitykit/scene/findentity(named:).md)
- [performQuery(_:)](realitykit/scene/performquery(_:).md)
