# Unity SDK Architecture

Overview of the Board Unity SDK components. For the SDK-neutral platform pipeline (sensor, NPU, OS touch service), see [Architecture](https://docs.dev.board.fun/learn/architecture).

* * *

## Core Components

### [BoardInput](https://docs.dev.board.fun/unity/api/BoardInput)

The touch input subsystem. Receives contact data from Board hardware and provides it to your game.

**Responsibilities:**

- Tracking active contacts
- Contact phase management (began, moved, ended)
- Glyph recognition
- Input smoothing

**Key APIs:**

- [`BoardInput.GetActiveContacts()`](https://docs.dev.board.fun/unity/api/BoardInput.GetActiveContacts) \- Poll current contacts each frame in `Update()`
- [`BoardInput.settingsChanged`](https://docs.dev.board.fun/unity/api/BoardInput.settingsChanged) \- Input settings change notifications

See [Touch Input](https://docs.dev.board.fun/guides/touch-input) for implementation details.

* * *

### [BoardSession](https://docs.dev.board.fun/unity/api/BoardSession)

Manages the current game session, players, and profiles.

**Responsibilities:**

- Tracking active profile
- Managing player list
- Notifying of player changes

**Key APIs:**

- [`BoardSession.players`](https://docs.dev.board.fun/unity/api/BoardSession.players) \- Current players
- [`BoardSession.playersChanged`](https://docs.dev.board.fun/unity/api/BoardSession.playersChanged) \- Change notifications

See [Player Management](https://docs.dev.board.fun/guides/player-management) for implementation details.

* * *

### [BoardApplication](https://docs.dev.board.fun/unity/api/BoardApplication)

Main entry point for Board system features like pause screen and profile switcher.

**Responsibilities:**

- Pause screen configuration and events
- Profile switcher overlay
- System-level interactions

**Key APIs:**

- [`BoardApplication.SetPauseScreenContext()`](https://docs.dev.board.fun/unity/api/BoardApplication.SetPauseScreenContext) \- Configure pause screen
- [`BoardApplication.ShowProfileSwitcher()`](https://docs.dev.board.fun/unity/api/BoardApplication.ShowProfileSwitcher()) \- Show profile UI

See [Pause Menu](https://docs.dev.board.fun/guides/pause-menu) and [Profile Switcher](https://docs.dev.board.fun/guides/profile-switcher) for implementation details.

* * *

### [BoardSaveGameManager](https://docs.dev.board.fun/unity/api/BoardSaveGameManager)

Handles persistent save game storage.

**Responsibilities:**

- Creating and loading save games
- Managing save game metadata
- Player-save associations
- Storage quota management

**Key APIs:**

- [`BoardSaveGameManager.CreateSaveGame()`](https://docs.dev.board.fun/unity/api/BoardSaveGameManager.CreateSaveGame(byte[],BoardSaveGameMetadataChange)) \- Save game data
- [`BoardSaveGameManager.GetSaveGamesMetadata()`](https://docs.dev.board.fun/unity/api/BoardSaveGameManager.GetSaveGamesMetadata()) \- List saves

See [Save Game System](https://docs.dev.board.fun/guides/save-games) for implementation details.

* * *

## Namespaces

| Namespace | Purpose |
| --- | --- |
| [`Board.Core`](https://docs.dev.board.fun/unity/api/Board.Core) | Application lifecycle, pause screen, logging |
| [`Board.Input`](https://docs.dev.board.fun/unity/api/Board.Input) | Touch contacts, glyphs, input settings |
| [`Board.Session`](https://docs.dev.board.fun/unity/api/Board.Session) | Players, profiles, sessions |
| [`Board.Save`](https://docs.dev.board.fun/unity/api/Board.Save) | Save game management |

* * *
