<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AnchorStateEvents/WillUnanchor",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation17AnchorStateEventsO12WillUnanchorV"
  },
  "title" : "AnchorStateEvents.WillUnanchor"
}
-->

# AnchorStateEvents.WillUnanchor

Event that triggers on an entity before the entity is unanchored with certain reasons.

```
struct WillUnanchor
```

## Topics

### Instance Properties

[`let entity: Entity`](/documentation/RealityKit/AnchorStateEvents/WillUnanchor/entity)

[`let reason: AnchorStateEvents.WillUnanchor.Reason`](/documentation/RealityKit/AnchorStateEvents/WillUnanchor/reason-swift.property)

### Enumerations

[`enum Reason`](/documentation/RealityKit/AnchorStateEvents/WillUnanchor/Reason-swift.enum)

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Event`](/documentation/RealityKit/Event)

[`Sendable`](/documentation/Swift/Sendable)

---

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)