---
title: TableSeat
framework: tabletopkit
role: symbol
role_heading: Protocol
path: tabletopkit/tableseat
---

# TableSeat

A protocol for seats at the table that players occupy.

## Declaration

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

## Overview

Overview To represent seats in your game, follow these steps: Create a structure that conforms to this protocol. Set the State type alias to TableSeatState. Declare the id property as a TableSeatIdentifier structure. Declare the initialState property as a State structure. Implement an initializer that sets these properties. 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 object using one of its add methods. For example, use the add(seat:) method to specify a position for the seat. 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 protocol instead.

## Topics

### Getting the seat data

- [initialState](tabletopkit/tableseat/initialstate.md)
- [State](tabletopkit/tableseat/state.md)

## Relationships

### Inherits From

- [Identifiable](swift/identifiable.md)

### Inherited By

- [EntityTableSeat](tabletopkit/entitytableseat.md)

## See Also

### Seats

- [TableState](tabletopkit/tablestate.md)
- [EntityTableSeat](tabletopkit/entitytableseat.md)
- [TableSeatIdentifier](tabletopkit/tableseatidentifier.md)
- [TableSeatState](tabletopkit/tableseatstate.md)
- [SeatState](tabletopkit/seatstate.md)
