<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/Entity/findEntity(named:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation6EntityC04findC05namedACSgSS_tF"
  },
  "title" : "findEntity(named:)"
}
-->

# findEntity(named:)

Recursively searches all descendant entities for one with the given
name.

```
@MainActor @preconcurrency func findEntity(named name: String) -> Entity?
```

## Parameters

`name`

The entity name for which to search.

## Return Value

An entity with the given name, or `nil` if no entity is
found.

## Discussion

The [`findEntity(named:)`](/documentation/RealityKit/Entity/findEntity(named:)) method conducts a depth-first,
recursive search over all of the entity’s descendants for one whose
[`name`](/documentation/RealityKit/Entity/name) property matches the given name. The method returns the
first match. Entity names need not be unique.

---

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)