<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/TabletopGame/equipment(of:forEntity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TabletopKit",
      "RealityKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit0A4GameC01_ab8_RealityB0E9equipment2of9forEntityxSgxm_0D10Foundation0H0CtAD0H9EquipmentRzlF"
  },
  "title" : "equipment(of:forEntity:)"
}
-->

# equipment(of:forEntity:)

Retrieves the specified equipment type associated with an entity if it exists.

```
func equipment<E>(of type: E.Type, forEntity entity: Entity) -> E? where E : EntityEquipment
```

## Parameters

`type`

The type of equipment to retrieve.

`entity`

The entity that’s associated with the equipment type you want to find.

## Return Value

The equipment associated with the entity if it exists; otherwise, `nil`.

## Discussion

You can use this method to create custom interactions.

---

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)