<!--
{
  "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/anchor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation6EntityC6anchorAA12HasAnchoring_pSgvp"
  },
  "title" : "anchor"
}
-->

# anchor

The nearest ancestor entity that can act as an anchor.

```
@MainActor @preconcurrency var anchor: (any HasAnchoring)? { get }
```

## Discussion

This property returns `nil` if no ancestor can act as an anchor. An
entity can act as an anchor if it adopts the [`HasAnchoring`](/documentation/RealityKit/HasAnchoring) protocol.
Just because an ancestor can be anchored doesn’t mean that it is.
Inspect the [`isAnchored`](/documentation/RealityKit/Entity/isAnchored) property to see if an entity (or one
of its ancestors) is anchored.

---

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)