<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/TableSeat",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "TabletopKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit9TableSeatP"
  },
  "title" : "TableSeat"
}
-->

# TableSeat

A protocol for seats at the table that players occupy.

```
protocol TableSeat : Identifiable where Self.ID == TableSeatIdentifier
```

## Overview

To represent seats in your game, follow these steps:

1. Create a structure that conforms to this protocol.
2. Set the [`State`](/documentation/TabletopKit/TableSeat/State) type alias to [`TableSeatState`](/documentation/TabletopKit/TableSeatState).
3. Declare the `id` property as a [`TableSeatIdentifier`](/documentation/TabletopKit/TableSeatIdentifier) structure.
4. Declare the [`initialState`](/documentation/TabletopKit/TableSeat/initialState) property as a [`State`](/documentation/TabletopKit/TableSeat/State) structure.
5. Implement an initializer that sets these properties.

```swift
struct Seat: TableSeat {
    typealias State = TableSeatState
    var id: TableSeatIdentifier
    var initialState: State

    init(index: Int = 0, position: TableVisualState.Point2D) {
        id = .seat(index)
        initialState = .init(pose: .init(position: position, rotation: .init()))
    }
}
```

Then add the seats to the [`TableSetup`](/documentation/TabletopKit/TableSetup) object using one of its add methods. For example, use the [`add(seat:)`](/documentation/TabletopKit/TableSetup/add(seat:)-a9qw) method to specify a position for the seat.

```swift
var setup = TableSetup(tabletop: table)
setup.add(seat: Seat(index: 0, position: .init(x: 0, z: -0.5)))
```

To render seats using RealityKit, conform to the [`EntityTableSeat`](/documentation/TabletopKit/EntityTableSeat) protocol instead.

## Topics

### Getting the seat data

[`var initialState: Self.State`](/documentation/TabletopKit/TableSeat/initialState)

[`associatedtype State : SeatState`](/documentation/TabletopKit/TableSeat/State)

## Relationships

### Inherited By

[`EntityTableSeat`](/documentation/TabletopKit/EntityTableSeat)

### Inherits From

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

---

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)